public static final class SymbolTable.Symbol extends SimpleSlot
| Modifier and Type | Field and Description |
|---|---|
private SymbolTable.Reference |
declaration |
private JSDocInfo |
docInfo |
private SymbolTable.SymbolScope |
docScope |
private SymbolTable.SymbolScope |
propertyScope |
private java.util.Map<Node,SymbolTable.Reference> |
references |
private SymbolTable.SymbolScope |
scope |
private JSDocInfo.Visibility |
visibility
Stored separately from
docInfo, because the visibility stored
in JSDocInfo is not necessarily authoritative. |
| Constructor and Description |
|---|
Symbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope) |
| Modifier and Type | Method and Description |
|---|---|
SymbolTable.Reference |
defineReferenceAt(Node n) |
SymbolTable.Reference |
getDeclaration()
Gets the declaration of this symbol.
|
Node |
getDeclarationNode() |
FunctionType |
getFunctionType() |
JSDocInfo |
getJSDocInfo()
Gets the JSDoc for this slot.
|
SymbolTable.SymbolScope |
getPropertyScope() |
java.lang.String |
getSourceFileName() |
JSDocInfo.Visibility |
getVisibility() |
boolean |
isDocOnlyParameter()
Whether this is a variable that's only in JSDoc.
|
boolean |
isLexicalVariable()
Whether this is a variable in a lexical scope.
|
boolean |
isProperty()
Whether this is a property of another variable.
|
(package private) void |
setDeclaration(SymbolTable.Reference ref)
Sets the declaration node.
|
(package private) void |
setJSDocInfo(JSDocInfo info) |
(package private) void |
setPropertyScope(SymbolTable.SymbolScope scope) |
(package private) void |
setVisibility(JSDocInfo.Visibility v) |
java.lang.String |
toString() |
getName, getType, isTypeInferredprivate final java.util.Map<Node,SymbolTable.Reference> references
private final SymbolTable.SymbolScope scope
private SymbolTable.SymbolScope propertyScope
private SymbolTable.Reference declaration
private JSDocInfo docInfo
@Nullable private JSDocInfo.Visibility visibility
docInfo, because the visibility stored
in JSDocInfo is not necessarily authoritative.private SymbolTable.SymbolScope docScope
Symbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope)
public SymbolTable.Reference getDeclaration()
StaticTypedSlotgetDeclaration in interface StaticTypedSlot<JSType>getDeclaration in interface StaticSlotgetDeclaration in class SimpleSlotpublic FunctionType getFunctionType()
public SymbolTable.Reference defineReferenceAt(Node n)
void setDeclaration(SymbolTable.Reference ref)
public Node getDeclarationNode()
public java.lang.String getSourceFileName()
public SymbolTable.SymbolScope getPropertyScope()
void setPropertyScope(SymbolTable.SymbolScope scope)
public JSDocInfo getJSDocInfo()
StaticSlotgetJSDocInfo in interface StaticSlotgetJSDocInfo in class SimpleSlotvoid setJSDocInfo(JSDocInfo info)
@Nullable public JSDocInfo.Visibility getVisibility()
void setVisibility(JSDocInfo.Visibility v)
public boolean isProperty()
public boolean isLexicalVariable()
public boolean isDocOnlyParameter()
public java.lang.String toString()
toString in class java.lang.Object