public interface StaticTypedScope 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 |
getOwnSlot(java.lang.String name)
Like
getSlot but does not recurse into parent scopes. |
StaticTypedScope |
getParentScope()
Returns the scope enclosing this one or null if none.
|
StaticTypedSlot |
getSlot(java.lang.String name)
Returns any defined slot within this scope for this name.
|
JSType |
getTypeOfThis()
Returns the expected type of
this in the current scope. |
default JSType |
lookupQualifiedName(QualifiedName qname)
Looks up a given qualified name in the scope.
|
getRootNode, getTopmostScopeOfEventualDeclarationStaticTypedScope getParentScope()
getParentScope in interface StaticScopeStaticTypedSlot getSlot(java.lang.String name)
getSlot in interface StaticScopename - The name of the variable slot to look up.null if no definition exists.StaticTypedSlot getOwnSlot(java.lang.String name)
getSlot but does not recurse into parent scopes.getOwnSlot in interface StaticScopeJSType getTypeOfThis()
this in the current scope.@Nullable default JSType lookupQualifiedName(QualifiedName qname)
This is always more or equally expensive as calling getSlot(String name), so should only be used when necessary.
Copyright © 2009-2019 Google. All Rights Reserved.