public class AbstractVar<S extends com.google.javascript.jscomp.AbstractScope<S,V>,V extends AbstractVar<S,V>> extends java.lang.Object implements StaticSlot, StaticRef
Scope to store information about variables.| Modifier and Type | Method and Description |
|---|---|
protected Token |
declarationType() |
boolean |
equals(java.lang.Object other) |
V |
getDeclaration()
Gets the declaration of this symbol.
|
Node |
getInitialValue() |
JSDocInfo |
getJSDocInfo()
Gets the JSDoc for this slot.
|
java.lang.String |
getName()
Gets the name of the slot.
|
Node |
getNameNode() |
Node |
getNode()
The node where the reference lives.
|
Node |
getParentNode() |
S |
getScope() |
StaticSourceFile |
getSourceFile()
The source file where the reference lives.
|
V |
getSymbol()
The variable that this reference points to.
|
int |
hashCode() |
boolean |
isArguments() |
boolean |
isBleedingFunction()
Whether this is a bleeding function (an anonymous named function
that bleeds into the inner scope).
|
boolean |
isDefaultParam() |
boolean |
isDefine()
Returns
true if the variable is declared as a define. |
boolean |
isGlobal() |
boolean |
isInferredConst()
Returns
true if the variable is declared as a constant,
based on the value reported by NodeUtil. |
boolean |
isLocal() |
public java.lang.String getName()
StaticSlotgetName in interface StaticSlotpublic final Node getNode()
StaticRefpublic StaticSourceFile getSourceFile()
StaticRefgetSourceFile in interface StaticRefpublic final V getSymbol()
StaticRefpublic final V getDeclaration()
StaticSlotgetDeclaration in interface StaticSlotpublic final Node getParentNode()
public boolean isBleedingFunction()
public final S getScope()
public boolean isGlobal()
public final boolean isLocal()
public final boolean isInferredConst()
true if the variable is declared as a constant,
based on the value reported by NodeUtil.public final boolean isDefine()
true if the variable is declared as a define.
A variable is a define if it is annotated by @define.public final Node getInitialValue()
public Node getNameNode()
public JSDocInfo getJSDocInfo()
StaticSlotgetJSDocInfo in interface StaticSlotpublic final boolean isDefaultParam()
public boolean isArguments()
protected Token declarationType()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2009-2018 Google. All Rights Reserved.