public class Scope
extends java.lang.Object
| Constructor and Description |
|---|
Scope(java.util.Map<java.lang.String,java.lang.Object> globalBindings)
Create a new
Scope, with the given initial set of "global" bindings. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
peek() |
void |
pop()
Pop the most recent bindings off the stack.
|
void |
push(java.util.Map<java.lang.String,java.lang.Object> bindings)
Push the given bindings onto the stack.
|
java.lang.Object |
resolve(java.lang.String name)
Resolve the given named variable from the stack of bindings, most recently-pushed to last.
|
public Scope(java.util.Map<java.lang.String,java.lang.Object> globalBindings)
Scope, with the given initial set of "global" bindings.globalBindings - A set of "global" bindings that you want first on the stack.public void push(java.util.Map<java.lang.String,java.lang.Object> bindings)
bindings - The bindings to push.public void pop()
public java.util.Map<java.lang.String,java.lang.Object> peek()
@Nullable public java.lang.Object resolve(java.lang.String name)
name - The name to resolve.