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()
StaticSlot
getName
in interface StaticSlot
public Node getNode()
StaticRef
public StaticSourceFile getSourceFile()
StaticRef
getSourceFile
in interface StaticRef
public Property getSymbol()
StaticTypedRef
getSymbol
in interface StaticTypedRef<JSType>
getSymbol
in interface StaticRef
public Property getDeclaration()
StaticTypedSlot
getDeclaration
in interface StaticTypedSlot<JSType>
getDeclaration
in interface StaticSlot
public JSType getType()
StaticTypedSlot
getType
in interface StaticTypedSlot<JSType>
null
if no type is declared for it.public boolean isTypeInferred()
StaticTypedSlot
isTypeInferred
in interface StaticTypedSlot<JSType>
boolean isFromExterns()
void setType(JSType type)
public JSDocInfo getJSDocInfo()
StaticSlot
getJSDocInfo
in interface StaticSlot
void setJSDocInfo(JSDocInfo info)
public void setNode(Node n)
public java.lang.String toString()
toString
in class java.lang.Object