Class AbstractStaticScope<T>
java.lang.Object
com.google.javascript.rhino.testing.AbstractStaticScope<T>
- All Implemented Interfaces:
StaticScope<T>
- Direct Known Subclasses:
MapBasedScope
A scope that just returns null for everything.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOwnSlot
(String name) LikegetSlot
but does not recurse into parent scopes.Returns the scope enclosing this one or null if none.Returns the root node associated with this scope.abstract StaticSlot<T>
Returns any defined slot within this scope for this name.Returns the expected type ofthis
in the current scope.
-
Constructor Details
-
AbstractStaticScope
public AbstractStaticScope()
-
-
Method Details
-
getRootNode
Description copied from interface:StaticScope
Returns the root node associated with this scope. May be null.- Specified by:
getRootNode
in interfaceStaticScope<T>
-
getParentScope
Description copied from interface:StaticScope
Returns the scope enclosing this one or null if none.- Specified by:
getParentScope
in interfaceStaticScope<T>
-
getSlot
Description copied from interface:StaticScope
Returns any defined slot within this scope for this name. This call continues searching through parent scopes if a slot with this name is not found in the current scope.- Specified by:
getSlot
in interfaceStaticScope<T>
- Parameters:
name
- The name of the variable slot to look up.- Returns:
- The defined slot for the variable, or
null
if no definition exists.
-
getOwnSlot
Description copied from interface:StaticScope
LikegetSlot
but does not recurse into parent scopes.- Specified by:
getOwnSlot
in interfaceStaticScope<T>
-
getTypeOfThis
Description copied from interface:StaticScope
Returns the expected type ofthis
in the current scope.- Specified by:
getTypeOfThis
in interfaceStaticScope<T>
-