Class Property
- java.lang.Object
-
- com.google.javascript.rhino.jstype.Property
-
- All Implemented Interfaces:
StaticTypedRef,StaticTypedSlot,StaticRef,StaticSlot,java.io.Serializable
public final class Property extends java.lang.Object implements StaticTypedSlot, StaticTypedRef
A property slot of an object.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProperty.OwnedPropertyA property instance associated with particular owner type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertygetDeclaration()Gets the declaration of this symbol.JSDocInfogetJSDocInfo()Gets the JSDoc for this slot.java.lang.StringgetName()Gets the name of the slot.NodegetNode()The node where the reference lives.StaticTypedScopegetScope()StaticSourceFilegetSourceFile()The source file where the reference lives.PropertygetSymbol()The variable that this reference points to.JSTypegetType()Returns the type information, if any, for this slot.inthashCode()booleanisTypeInferred()Returns whether the type has been inferred (as opposed to declared).voidsetNode(Node n)java.lang.StringtoString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StaticSlotGets the name of the slot.- Specified by:
getNamein interfaceStaticSlot
-
getNode
public Node getNode()
Description copied from interface:StaticRefThe node where the reference lives.
-
getSourceFile
public StaticSourceFile getSourceFile()
Description copied from interface:StaticRefThe source file where the reference lives.- Specified by:
getSourceFilein interfaceStaticRef
-
getSymbol
public Property getSymbol()
Description copied from interface:StaticTypedRefThe variable that this reference points to.- Specified by:
getSymbolin interfaceStaticRef- Specified by:
getSymbolin interfaceStaticTypedRef
-
getDeclaration
public Property getDeclaration()
Description copied from interface:StaticTypedSlotGets the declaration of this symbol. May not exist.- Specified by:
getDeclarationin interfaceStaticSlot- Specified by:
getDeclarationin interfaceStaticTypedSlot
-
getType
public JSType getType()
Description copied from interface:StaticTypedSlotReturns the type information, if any, for this slot.- Specified by:
getTypein interfaceStaticTypedSlot- Returns:
- The type or
nullif no type is declared for it.
-
isTypeInferred
public boolean isTypeInferred()
Description copied from interface:StaticTypedSlotReturns whether the type has been inferred (as opposed to declared).- Specified by:
isTypeInferredin interfaceStaticTypedSlot
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlotGets the JSDoc for this slot.- Specified by:
getJSDocInfoin interfaceStaticSlot
-
setNode
public void setNode(Node n)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getScope
public StaticTypedScope getScope()
- Specified by:
getScopein interfaceStaticSlot- Specified by:
getScopein interfaceStaticTypedSlot
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-