Interface StaticScope<T>
- Type Parameters:
T- The type of information stored about the slot
- All Known Subinterfaces:
FlowScope
- All Known Implementing Classes:
AbstractStaticScope,EnumElementType,EnumType,FunctionType,MapBasedScope,NoObjectType,NoType,ObjectType,Scope,SymbolTable.SymbolScope,TemplateType,TemplatizedType,UnknownType
public interface StaticScope<T>
The
StaticScope interface must be implemented by any object that
defines variables for the purposes of static analysis. It is distinguished
from the Scriptable class that Rhino normally uses to represent a
run-time scope.-
Method Summary
Modifier and TypeMethodDescriptiongetOwnSlot(String name) LikegetSlotbut does not recurse into parent scopes.Returns the scope enclosing this one or null if none.Returns the root node associated with this scope.Returns any defined slot within this scope for this name.Returns the expected type ofthisin the current scope.
-
Method Details
-
getRootNode
Node getRootNode()Returns the root node associated with this scope. May be null. -
getParentScope
StaticScope<T> getParentScope()Returns the scope enclosing this one or null if none. -
getSlot
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.- Parameters:
name- The name of the variable slot to look up.- Returns:
- The defined slot for the variable, or
nullif no definition exists.
-
getOwnSlot
LikegetSlotbut does not recurse into parent scopes. -
getTypeOfThis
T getTypeOfThis()Returns the expected type ofthisin the current scope.
-