Class Property
- java.lang.Object
-
- com.google.javascript.rhino.jstype.Property
-
- All Implemented Interfaces:
StaticReference<JSType>,StaticSlot<JSType>,java.io.Serializable
public final class Property extends java.lang.Object implements java.io.Serializable, StaticSlot<JSType>, StaticReference<JSType>
A property slot of an object.- See Also:
- Serialized Form
-
-
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.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.booleanisTypeInferred()Returns whether the type has been inferred (as opposed to declared).voidsetNode(Node n)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StaticSlotGets the name of the slot.- Specified by:
getNamein interfaceStaticSlot<JSType>
-
getNode
public Node getNode()
Description copied from interface:StaticReferenceThe node where the reference lives.- Specified by:
getNodein interfaceStaticReference<JSType>
-
getSourceFile
public StaticSourceFile getSourceFile()
Description copied from interface:StaticReferenceThe source file where the reference lives.- Specified by:
getSourceFilein interfaceStaticReference<JSType>
-
getSymbol
public Property getSymbol()
Description copied from interface:StaticReferenceThe variable that this reference points to.- Specified by:
getSymbolin interfaceStaticReference<JSType>
-
getDeclaration
public Property getDeclaration()
Description copied from interface:StaticSlotGets the declaration of this symbol. May not exist.- Specified by:
getDeclarationin interfaceStaticSlot<JSType>
-
getType
public JSType getType()
Description copied from interface:StaticSlotReturns the type information, if any, for this slot.- Specified by:
getTypein interfaceStaticSlot<JSType>- Returns:
- The type or
nullif no type is declared for it.
-
isTypeInferred
public boolean isTypeInferred()
Description copied from interface:StaticSlotReturns whether the type has been inferred (as opposed to declared).- Specified by:
isTypeInferredin interfaceStaticSlot<JSType>
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlotGets the JSDoc for this slot.- Specified by:
getJSDocInfoin interfaceStaticSlot<JSType>
-
setNode
public void setNode(Node n)
-
-