Package com.google.javascript.jscomp
Class Scope
- java.lang.Object
-
- com.google.javascript.jscomp.AbstractScope<Scope,Var>
-
- com.google.javascript.jscomp.Scope
-
- All Implemented Interfaces:
StaticScope,java.io.Serializable
public final class Scope extends AbstractScope<Scope,Var>
Scope contains information about a variable scope in JavaScript. Scopes can be nested, a scope points back to its parent scope. A Scope contains information about variables defined in that scope.- See Also:
NodeTraversal, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDepth()The depth of the scope.ScopegetParent()Returns the parent scope, or null if this is the global scope.Scopeuntyped()-
Methods inherited from class com.google.javascript.jscomp.AbstractScope
getAllAccessibleVariables, getAllSymbols, getArgumentsVar, getClosestContainerScope, getClosestHoistScope, getGlobalScope, getOwnSlot, getParentScope, getRootNode, getSlot, getVar, getVarCount, getVarIterable, hasOwnImplicitSlot, hasOwnSlot, hasSlot, isBlockScope, isCatchScope, isFunctionBlockScope, isFunctionScope, isGlobal, isLocal, isModuleScope, toString, typed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.javascript.rhino.StaticScope
getTopmostScopeOfEventualDeclaration
-
-
-
-
Method Detail
-
untyped
public Scope untyped()
- Overrides:
untypedin classAbstractScope<Scope,Var>
-
getDepth
public int getDepth()
Description copied from class:AbstractScopeThe depth of the scope. The global scope has depth 0.- Specified by:
getDepthin classAbstractScope<Scope,Var>
-
getParent
public Scope getParent()
Description copied from class:AbstractScopeReturns the parent scope, or null if this is the global scope.- Specified by:
getParentin classAbstractScope<Scope,Var>
-
-