public final class Property extends java.lang.Object implements java.io.Serializable, StaticTypedSlot<JSType>, StaticTypedRef<JSType>
| Modifier and Type | Field and Description |
|---|---|
private JSDocInfo |
docInfo
The JSDocInfo for this property.
|
private boolean |
inferred
Whether the property's type is inferred.
|
private java.lang.String |
name
Property's name.
|
private Node |
propertyNode
The node corresponding to this property, e.g., a GETPROP node that
declares this property.
|
private static long |
serialVersionUID |
private JSType |
type
Property's type.
|
| Constructor and Description |
|---|
Property(java.lang.String name,
JSType type,
boolean inferred,
Node propertyNode) |
| Modifier and Type | Method and 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.
|
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.
|
(package private) boolean |
isFromExterns() |
boolean |
isTypeInferred()
Returns whether the type has been inferred (as opposed to declared).
|
(package private) void |
setJSDocInfo(JSDocInfo info) |
void |
setNode(Node n) |
(package private) void |
setType(JSType type) |
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.String name
private JSType type
private final boolean inferred
private Node propertyNode
private JSDocInfo docInfo
public java.lang.String getName()
StaticSlotgetName in interface StaticSlotpublic Node getNode()
StaticRefpublic StaticSourceFile getSourceFile()
StaticRefgetSourceFile in interface StaticRefpublic Property getSymbol()
StaticTypedRefgetSymbol in interface StaticTypedRef<JSType>getSymbol in interface StaticRefpublic Property getDeclaration()
StaticTypedSlotgetDeclaration in interface StaticTypedSlot<JSType>getDeclaration in interface StaticSlotpublic JSType getType()
StaticTypedSlotgetType in interface StaticTypedSlot<JSType>null if no type is declared for it.public boolean isTypeInferred()
StaticTypedSlotisTypeInferred in interface StaticTypedSlot<JSType>boolean isFromExterns()
void setType(JSType type)
public JSDocInfo getJSDocInfo()
StaticSlotgetJSDocInfo in interface StaticSlotvoid setJSDocInfo(JSDocInfo info)
public void setNode(Node n)
public java.lang.String toString()
toString in class java.lang.Object