Package com.google.javascript.jscomp
Class SymbolTable.Symbol
- java.lang.Object
-
- com.google.javascript.rhino.jstype.SimpleSlot
-
- com.google.javascript.jscomp.SymbolTable.Symbol
-
- All Implemented Interfaces:
StaticTypedSlot
,StaticSlot
,java.io.Serializable
- Enclosing class:
- SymbolTable
public static final class SymbolTable.Symbol extends SimpleSlot
A symbol-table entry- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymbolTable.Reference
defineReferenceAt(Node n)
SymbolTable.Reference
defineReferenceAt(Node n, boolean isImport)
boolean
equals(java.lang.Object o)
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()
int
hashCode()
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.java.lang.String
toString()
-
Methods inherited from class com.google.javascript.rhino.jstype.SimpleSlot
getName, getScope, getType, isTypeInferred
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getDeclaration
public SymbolTable.Reference 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
- Overrides:
getDeclaration
in classSimpleSlot
-
getFunctionType
public FunctionType getFunctionType()
-
defineReferenceAt
public SymbolTable.Reference defineReferenceAt(Node n, boolean isImport)
-
defineReferenceAt
public SymbolTable.Reference defineReferenceAt(Node n)
-
getDeclarationNode
public Node getDeclarationNode()
-
getSourceFileName
public java.lang.String getSourceFileName()
-
getPropertyScope
public SymbolTable.SymbolScope getPropertyScope()
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlot
Gets the JSDoc for this slot.- Specified by:
getJSDocInfo
in interfaceStaticSlot
- Overrides:
getJSDocInfo
in classSimpleSlot
-
getVisibility
@Nullable public JSDocInfo.Visibility getVisibility()
-
isProperty
public boolean isProperty()
Whether this is a property of another variable.
-
isLexicalVariable
public boolean isLexicalVariable()
Whether this is a variable in a lexical scope.
-
isDocOnlyParameter
public boolean isDocOnlyParameter()
Whether this is a variable that's only in JSDoc.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-