public class Var extends Object implements StaticSlot, StaticRef
Scope
to store information about variables.Modifier and Type | Method and Description |
---|---|
protected Token |
declarationType() |
boolean |
equals(Object other) |
Var |
getDeclaration()
Gets the declaration of this symbol.
|
Node |
getInitialValue() |
JSDocInfo |
getJSDocInfo()
Gets the JSDoc for this slot.
|
String |
getName()
Gets the name of the slot.
|
Node |
getNameNode() |
Node |
getNode()
The node where the reference lives.
|
Node |
getParentNode() |
Scope |
getScope() |
StaticSourceFile |
getSourceFile()
The source file where the reference lives.
|
Var |
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 |
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() |
String |
toString() |
public String getName()
StaticSlot
getName
in interface StaticSlot
public Node getNode()
StaticRef
public StaticSourceFile getSourceFile()
StaticRef
getSourceFile
in interface StaticRef
public Var getSymbol()
StaticRef
public Var getDeclaration()
StaticSlot
getDeclaration
in interface StaticSlot
public Node getParentNode()
public boolean isBleedingFunction()
public Scope getScope()
public boolean isGlobal()
public boolean isLocal()
public boolean isInferredConst()
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 Node getNameNode()
public JSDocInfo getJSDocInfo()
StaticSlot
getJSDocInfo
in interface StaticSlot
public boolean isArguments()
protected Token declarationType()
Copyright © 2009-2017 Google. All Rights Reserved.