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 java.io.Serializable, StaticTypedSlot, StaticTypedRef
A property slot of an object.- Author:
- [email protected] (Nick Santos)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Property.OwnedProperty
A property instance associated with particular owner type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Property
getDeclaration()
Gets the declaration of this symbol.JSDocInfo
getJSDocInfo()
Gets the JSDoc for this slot.java.lang.String
getName()
Gets the name of the slot.Node
getNode()
The node where the reference lives.StaticTypedScope
getScope()
StaticSourceFile
getSourceFile()
The source file where the reference lives.Property
getSymbol()
The variable that this reference points to.JSType
getType()
Returns the type information, if any, for this slot.int
hashCode()
boolean
isTypeInferred()
Returns whether the type has been inferred (as opposed to declared).void
setNode(Node n)
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StaticSlot
Gets the name of the slot.- Specified by:
getName
in interfaceStaticSlot
-
getNode
public Node getNode()
Description copied from interface:StaticRef
The node where the reference lives.
-
getSourceFile
public StaticSourceFile getSourceFile()
Description copied from interface:StaticRef
The source file where the reference lives.- Specified by:
getSourceFile
in interfaceStaticRef
-
getSymbol
public Property getSymbol()
Description copied from interface:StaticTypedRef
The variable that this reference points to.- Specified by:
getSymbol
in interfaceStaticRef
- Specified by:
getSymbol
in interfaceStaticTypedRef
-
getDeclaration
public Property getDeclaration()
Description copied from interface:StaticTypedSlot
Gets the declaration of this symbol. May not exist.- Specified by:
getDeclaration
in interfaceStaticSlot
- Specified by:
getDeclaration
in interfaceStaticTypedSlot
-
getType
public JSType getType()
Description copied from interface:StaticTypedSlot
Returns the type information, if any, for this slot.- Specified by:
getType
in interfaceStaticTypedSlot
- Returns:
- The type or
null
if no type is declared for it.
-
isTypeInferred
public boolean isTypeInferred()
Description copied from interface:StaticTypedSlot
Returns whether the type has been inferred (as opposed to declared).- Specified by:
isTypeInferred
in interfaceStaticTypedSlot
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlot
Gets the JSDoc for this slot.- Specified by:
getJSDocInfo
in interfaceStaticSlot
-
setNode
public void setNode(Node n)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getScope
public StaticTypedScope getScope()
- Specified by:
getScope
in interfaceStaticSlot
- Specified by:
getScope
in interfaceStaticTypedSlot
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-