public abstract class AbstractStaticScope<T> extends Object implements StaticTypedScope<T>
Constructor and Description |
---|
AbstractStaticScope() |
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.
|
Node |
getRootNode()
Returns the root node associated with this scope.
|
abstract 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. |
public Node getRootNode()
StaticScope
getRootNode
in interface StaticScope
public StaticTypedScope<T> getParentScope()
StaticTypedScope
getParentScope
in interface StaticTypedScope<T>
getParentScope
in interface StaticScope
public abstract StaticTypedSlot<T> getSlot(String name)
StaticTypedScope
getSlot
in interface StaticTypedScope<T>
getSlot
in interface StaticScope
name
- The name of the variable slot to look up.null
if no
definition exists.public StaticTypedSlot<T> getOwnSlot(String name)
StaticTypedScope
getSlot
but does not recurse into parent scopes.getOwnSlot
in interface StaticTypedScope<T>
getOwnSlot
in interface StaticScope
public T getTypeOfThis()
StaticTypedScope
this
in the current scope.getTypeOfThis
in interface StaticTypedScope<T>
Copyright © 2009-2015 Google. All Rights Reserved.