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() |
declarationTypepublic String getName()
StaticSlotgetName in interface StaticSlotgetName in class Varpublic Node getNode()
StaticRefpublic StaticSourceFile getSourceFile()
StaticRefgetSourceFile in interface StaticRefgetSourceFile in class Varpublic TypedVar getSymbol()
StaticRefpublic TypedVar getDeclaration()
StaticSlotgetDeclaration in interface StaticTypedSlot<JSType>getDeclaration in interface StaticSlotgetDeclaration in class Varpublic Node getParentNode()
getParentNode in class Varpublic boolean isBleedingFunction()
VarisBleedingFunction in class Varpublic TypedScope getScope()
public boolean isInferredConst()
Vartrue if the variable is declared as a constant,
based on the value reported by NodeUtil.isInferredConst in class Varpublic boolean isDefine()
Vartrue 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 Varpublic Node getNameNode()
getNameNode in class Varpublic JSDocInfo getJSDocInfo()
StaticSlotgetJSDocInfo in interface StaticSlotgetJSDocInfo in class Varpublic 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-2015 Google. All Rights Reserved.