public class TypedVar extends Var implements StaticTypedSlot<JSType>, StaticTypedRef<JSType>
isVar
throw an exception when called.
The reason for this is that we want to shadow methods from the parent class, to avoid calling
them accidentally.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
TypedVar |
getDeclaration()
Gets the declaration of this symbol.
|
Node |
getInitialValue() |
String |
getInputName() |
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() |
TypedScope |
getScope() |
StaticSourceFile |
getSourceFile()
The source file where the reference lives.
|
TypedVar |
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 |
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() |
boolean |
isTypeInferred()
Returns whether this variable's type is inferred.
|
String |
toString() |
declarationType, isArguments
public String getName()
StaticSlot
getName
in interface StaticSlot
getName
in class Var
public Node getNode()
StaticRef
public StaticSourceFile getSourceFile()
StaticRef
getSourceFile
in interface StaticRef
getSourceFile
in class Var
public TypedVar getSymbol()
StaticRef
public TypedVar getDeclaration()
StaticSlot
getDeclaration
in interface StaticTypedSlot<JSType>
getDeclaration
in interface StaticSlot
getDeclaration
in class Var
public Node getParentNode()
getParentNode
in class Var
public boolean isBleedingFunction()
Var
isBleedingFunction
in class Var
public TypedScope getScope()
public boolean isInferredConst()
Var
true
if the variable is declared as a constant,
based on the value reported by NodeUtil
.isInferredConst
in class Var
public boolean isDefine()
Var
true
if the variable is declared as a define.
A variable is a define if it is annotated by @define
.public Node getInitialValue()
getInitialValue
in class Var
public Node getNameNode()
getNameNode
in class Var
public JSDocInfo getJSDocInfo()
StaticSlot
getJSDocInfo
in interface StaticSlot
getJSDocInfo
in class Var
public JSType getType()
#isTypeInferred()
.getType
in interface StaticTypedSlot<JSType>
null
if no type is declared for it.public boolean isTypeInferred()
getType()
.isTypeInferred
in interface StaticTypedSlot<JSType>
public String getInputName()
Copyright © 2009–2023 Google. All rights reserved.