|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.christopherschultz.evaluator.util.DefaultEvaluationContext net.christopherschultz.evaluator.util.ChainedEvaluationContext
public class ChainedEvaluationContext
Provides a wrapper around another EvaluationContext.
This is useful when you want to have a shared, global set of functions and values, but also want to have some functions and values local to one EvaluationContext.
This class provides read-only access to the parent EvaluationContext, and searches the local environment before searching the parent.
Constructor Summary | |
---|---|
ChainedEvaluationContext(EvaluationContext parent)
Creates a new ChainedEvaluationContext. |
Method Summary | |
---|---|
Object |
get(String identifier)
Gets the value of the specified identifier. |
Map |
getAll()
Returns a Map of all bound identifiers and their values. |
Methods inherited from class net.christopherschultz.evaluator.util.DefaultEvaluationContext |
---|
getProperty, load, load, loadStandard, remove, removeProperty, set, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChainedEvaluationContext(EvaluationContext parent)
parent
- The parent EvaluationContext.Method Detail |
---|
public Object get(String identifier)
get
in interface EvaluationContext
get
in class DefaultEvaluationContext
identifier
- The identifier for the value.
public Map getAll()
DefaultEvaluationContext
getAll
in interface EvaluationContext
getAll
in class DefaultEvaluationContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |