public class AbstractVar<S extends 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 |
---|---|
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()
Returns the name as a string.
|
Node |
getNameNode() |
Node |
getNode()
The node where the reference lives.
|
Node |
getParentNode() |
S |
getScope() |
Node |
getScopeRoot()
Returns the root node of the scope in which this name is defined.
|
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 |
isDeclaredOrInferredConst()
Returns
true if the variable is declared or inferred to be a constant. |
boolean |
isDefaultParam() |
boolean |
isDefine()
Returns
true if the variable is declared as a define. |
boolean |
isGlobal() |
boolean |
isLocal() |
boolean |
isThis() |
public java.lang.String getName()
getName
in interface StaticSlot
public final Node getScopeRoot()
public final Node getNode()
StaticRef
public final StaticSourceFile getSourceFile()
StaticRef
getSourceFile
in interface StaticRef
public final V getSymbol()
StaticRef
public final V getDeclaration()
StaticSlot
getDeclaration
in interface StaticSlot
public final Node getParentNode()
public boolean isBleedingFunction()
public final S getScope()
getScope
in interface StaticSlot
public boolean isGlobal()
public final boolean isLocal()
public final boolean isDeclaredOrInferredConst()
true
if the variable is declared or inferred to be a constant.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()
StaticSlot
getJSDocInfo
in interface StaticSlot
public final boolean isDefaultParam()
public final boolean isArguments()
public final boolean isThis()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2009-2019 Google. All Rights Reserved.