public class Scope
extends java.util.AbstractMap<java.lang.Object,java.lang.Object>
Modifier and Type | Class and Description |
---|---|
static class |
Scope.Info
Class to encapsulate and provide access to info about
the current scope for debugging.
|
Modifier and Type | Field and Description |
---|---|
private Scope.Info |
info |
protected java.lang.Object |
owner |
private Scope |
parent |
private java.lang.Object |
replaced |
private static java.lang.String |
setReturnValue |
private java.util.Map<java.lang.Object,java.lang.Object> |
storage |
Constructor and Description |
---|
Scope(java.lang.Object owner,
java.lang.Object previous) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> |
entrySet() |
java.lang.Object |
get(java.lang.Object key)
getter
|
protected int |
getDepth()
Returns the number of control arguments of this type
that are stacked up.
|
Scope.Info |
getInfo()
Returns info about the current scope for debugging purposes.
|
Scope |
getParent()
Returns the parent control reference overridden by the placement
of this instance in the context.
|
java.lang.Object |
getReplaced()
Returns the user's context reference overridden by the placement
of this instance in the context.
|
private java.util.Map<java.lang.Object,java.lang.Object> |
getStorage() |
Scope |
getTopmost()
Returns the topmost parent control reference, retrieved
by simple recursion on
getParent() . |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
setter
|
java.lang.String |
set(java.lang.Object key,
java.lang.Object value)
Convenience method to call put(key,val) in a template
without worrying about what is returned/rendered by the call.
|
protected void |
stop()
Allows #stop to easily trigger the proper StopCommand for this scope.
|
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
private static final java.lang.String setReturnValue
private java.util.Map<java.lang.Object,java.lang.Object> storage
private java.lang.Object replaced
private Scope parent
private Scope.Info info
protected final java.lang.Object owner
public Scope(java.lang.Object owner, java.lang.Object previous)
owner
- previous
- private java.util.Map<java.lang.Object,java.lang.Object> getStorage()
public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.Object,java.lang.Object>
entrySet
in class java.util.AbstractMap<java.lang.Object,java.lang.Object>
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.Object,java.lang.Object>
get
in class java.util.AbstractMap<java.lang.Object,java.lang.Object>
key
- public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
put
in class java.util.AbstractMap<java.lang.Object,java.lang.Object>
key
- value
- public java.lang.String set(java.lang.Object key, java.lang.Object value)
key
- value
- protected void stop()
protected int getDepth()
public Scope getTopmost()
getParent()
.public Scope getParent()
public java.lang.Object getReplaced()
getParent()
.public Scope.Info getInfo()