|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.javascript.jscomp.Scope.Var
public static class Scope.Var
Stores info about a variable
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public String getName()
getName
in interface StaticSlot<JSType>
public Node getNode()
getNode
in interface StaticReference<JSType>
public StaticSourceFile getSourceFile()
StaticReference
getSourceFile
in interface StaticReference<JSType>
public Scope.Var getSymbol()
StaticReference
getSymbol
in interface StaticReference<JSType>
public Scope.Var getDeclaration()
StaticSlot
getDeclaration
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 annotaed 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()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |