Package com.google.javascript.jscomp
Class SymbolTable.SymbolScope
- java.lang.Object
-
- com.google.javascript.jscomp.SymbolTable.SymbolScope
-
- Enclosing class:
- SymbolTable
public static final class SymbolTable.SymbolScope extends java.lang.Object
Scope of a symbol
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndexInParent()
int
getIndexOfSymbol(SymbolTable.Symbol sym)
Gets a unique index for the symbol in this scope.SymbolTable.SymbolScope
getParentScope()
SymbolTable.Symbol
getQualifiedSlot(java.lang.String name)
Get the slot for a fully-qualified name (e.g., "a.b.c") by trying to find property scopes at each part of the path.int
getScopeDepth()
SymbolTable.Symbol
getSlot(java.lang.String name)
JSType
getTypeOfThis()
boolean
isBlockScope()
boolean
isDocScope()
Returns whether this is a doc scope.boolean
isGlobalScope()
boolean
isLexicalScope()
boolean
isModuleScope()
boolean
isPropertyScope()
java.lang.String
toString()
-
-
-
Method Detail
-
getIndexOfSymbol
public int getIndexOfSymbol(SymbolTable.Symbol sym)
Gets a unique index for the symbol in this scope.
-
getParentScope
public SymbolTable.SymbolScope getParentScope()
-
getQualifiedSlot
public SymbolTable.Symbol getQualifiedSlot(java.lang.String name)
Get the slot for a fully-qualified name (e.g., "a.b.c") by trying to find property scopes at each part of the path.
-
getSlot
public SymbolTable.Symbol getSlot(java.lang.String name)
-
getTypeOfThis
public JSType getTypeOfThis()
-
isGlobalScope
public boolean isGlobalScope()
-
isModuleScope
public boolean isModuleScope()
-
isDocScope
public boolean isDocScope()
Returns whether this is a doc scope. A doc scope is a table for symbols that are documented solely within a JSDoc comment.
-
isPropertyScope
public boolean isPropertyScope()
-
isLexicalScope
public boolean isLexicalScope()
-
isBlockScope
public boolean isBlockScope()
-
getScopeDepth
public int getScopeDepth()
-
getIndexInParent
public int getIndexInParent()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-