Package com.google.javascript.jscomp
Class AbstractVar<S extends AbstractScope<S,V>,V extends AbstractVar<S,V>>
java.lang.Object
com.google.javascript.jscomp.AbstractVar<S,V>
- All Implemented Interfaces:
StaticRef,StaticSlot,Serializable
public class AbstractVar<S extends AbstractScope<S,V>,V extends AbstractVar<S,V>>
extends Object
implements StaticSlot, StaticRef
Used by
Scope to store information about variables.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal VGets the declaration of this symbol.final @Nullable Nodefinal @Nullable JSDocInfoGets the JSDoc for this slot.final StringgetName()Gets the name of the slot.final Nodefinal NodegetNode()The node where the reference lives.final @Nullable Nodefinal SgetScope()final Nodefinal StaticSourceFileThe source file where the reference lives.final VThe variable that this reference points to.final inthashCode()final booleanbooleanWhether this is a bleeding function (an anonymous named function that bleeds into the inner scope).final booleanReturnstrueif the variable is declared or inferred to be a constant.final booleanfinal booleanisDefine()Returnstrueif the variable is declared as a define.final booleanisGlobal()final booleanisLocal()final booleanisThis()
-
Method Details
-
getName
Description copied from interface:StaticSlotGets the name of the slot.- Specified by:
getNamein interfaceStaticSlot
-
getScopeRoot
-
getNode
Description copied from interface:StaticRefThe node where the reference lives. -
getSourceFile
Description copied from interface:StaticRefThe source file where the reference lives.- Specified by:
getSourceFilein interfaceStaticRef
-
getSymbol
Description copied from interface:StaticRefThe variable that this reference points to. -
getDeclaration
Description copied from interface:StaticSlotGets the declaration of this symbol. May not exist.- Specified by:
getDeclarationin interfaceStaticSlot
-
getParentNode
-
isBleedingFunction
public boolean isBleedingFunction()Whether this is a bleeding function (an anonymous named function that bleeds into the inner scope). -
getScope
- Specified by:
getScopein interfaceStaticSlot
-
isGlobal
public final boolean isGlobal() -
isLocal
public final boolean isLocal() -
isDeclaredOrInferredConst
public final boolean isDeclaredOrInferredConst()Returnstrueif the variable is declared or inferred to be a constant. -
isDefine
public final boolean isDefine()Returnstrueif the variable is declared as a define. A variable is a define if it is annotated by@define. -
getInitialValue
-
getNameNode
-
getJSDocInfo
Description copied from interface:StaticSlotGets the JSDoc for this slot.- Specified by:
getJSDocInfoin interfaceStaticSlot
-
isDefaultParam
public final boolean isDefaultParam() -
isArguments
public final boolean isArguments() -
isThis
public final boolean isThis() -
equals
-
hashCode
public final int hashCode()
-