public class TypedVar extends AbstractVar<TypedScope,TypedVar> implements StaticTypedSlot, StaticTypedRef
AbstractVar subclass for use with TypedScope.
Note that this class inherits its equals(java.lang.Object) and hashCode() implementations from
ScopedName, which does not include any type information. This is necessary because Var-keyed maps are used across multiple top scopes, but it comes with the caveat that if TypedVar instances are stored in a set, the type information is at risk of disappearing if an
untyped (or differently typed) var is added for the same symbol.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getInputName() |
JSType |
getType()
Gets this variable's type.
|
int |
hashCode() |
boolean |
isTypeInferred()
Returns whether this variable's type is inferred.
|
java.lang.String |
toString() |
getDeclaration, getInitialValue, getJSDocInfo, getName, getNameNode, getNode, getParentNode, getScope, getScopeRoot, getSourceFile, getSymbol, isArguments, isBleedingFunction, isDeclaredOrInferredConst, isDefaultParam, isDefine, isGlobal, isLocal, isThisclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDeclaration, getScopegetJSDocInfo, getNamegetSymbolgetNode, getSourceFilepublic JSType getType()
#isTypeInferred().getType in interface StaticTypedSlotnull if no type is declared for it.public boolean isTypeInferred()
getType().isTypeInferred in interface StaticTypedSlotpublic java.lang.String getInputName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2009-2019 Google. All Rights Reserved.