T
- The type of information stored about the slotpublic interface StaticTypedScope<T> extends StaticScope
StaticTypedScope
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.Modifier and Type | Method and Description |
---|---|
StaticTypedSlot<T> |
getOwnSlot(String name)
Like
getSlot but does not recurse into parent scopes. |
StaticTypedScope<T> |
getParentScope()
Returns the scope enclosing this one or null if none.
|
StaticTypedSlot<T> |
getSlot(String name)
Returns any defined slot within this scope for this name.
|
T |
getTypeOfThis()
Returns the expected type of
this in the current scope. |
getRootNode
StaticTypedScope<T> getParentScope()
getParentScope
in interface StaticScope
StaticTypedSlot<T> getSlot(String name)
getSlot
in interface StaticScope
name
- The name of the variable slot to look up.null
if no
definition exists.StaticTypedSlot<T> getOwnSlot(String name)
getSlot
but does not recurse into parent scopes.getOwnSlot
in interface StaticScope
T getTypeOfThis()
this
in the current scope.Copyright © 2009–2023 Google. All rights reserved.