public static class Scope.Var extends Object implements StaticSlot<JSType>, StaticReference<JSType>
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Scope.Var |
getDeclaration()
Gets the declaration of this symbol.
|
Node |
getInitialValue() |
String |
getInputName() |
JSDocInfo |
getJSDocInfo()
Gets the JSDocInfo for the variable.
|
String |
getName()
Gets the name of the variable.
|
Node |
getNameNode()
Returns the name node that produced this variable.
|
Node |
getNode()
Gets the node for the name of the variable.
|
Node |
getParentNode()
Gets the parent of the name node.
|
StaticSourceFile |
getSourceFile()
The source file where the reference lives.
|
Scope.Var |
getSymbol()
The variable that this reference points to.
|
JSType |
getType()
Gets this variable's type.
|
int |
hashCode() |
boolean |
isBleedingFunction()
Whether this is a bleeding function (an anonymous named function
that bleeds into the inner scope.
|
boolean |
isConst()
Returns
true if the variable is declared as a constant,
based on the value reported by NodeUtil. |
boolean |
isDefine()
Returns
true if the variable is declared as a define. |
boolean |
isGlobal()
Returns whether this is a global variable.
|
boolean |
isLocal()
Returns whether this is a local variable.
|
boolean |
isNoShadow() |
boolean |
isTypeInferred()
Returns whether this variable's type is inferred.
|
String |
toString() |
public String getName()
getName in interface StaticSlot<JSType>public Node getNode()
getNode in interface StaticReference<JSType>public StaticSourceFile getSourceFile()
StaticReferencegetSourceFile in interface StaticReference<JSType>public Scope.Var getSymbol()
StaticReferencegetSymbol in interface StaticReference<JSType>public Scope.Var getDeclaration()
StaticSlotgetDeclaration in interface StaticSlot<JSType>public Node getParentNode()
public boolean isBleedingFunction()
public boolean isGlobal()
public boolean isLocal()
public boolean isConst()
true if the variable is declared as a constant,
based on the value reported by NodeUtil.public boolean isDefine()
true if the variable is declared as a define.
A variable is a define if it is annotated by @define.public Node getInitialValue()
public JSType getType()
#isTypeInferred().getType in interface StaticSlot<JSType>null if no type is declared for it.public Node getNameNode()
public JSDocInfo getJSDocInfo()
getJSDocInfo in interface StaticSlot<JSType>public boolean isTypeInferred()
getType().isTypeInferred in interface StaticSlot<JSType>public String getInputName()
public boolean isNoShadow()