public class BrooklynDslInterpreter extends PlanInterpreter.PlanInterpreterAdapter
PlanInterpreter which understands the $brooklyn DSLPlanInterpreter.PlanInterpreterAdapter| Constructor and Description |
|---|
BrooklynDslInterpreter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyMapEntry(PlanInterpretationNode node,
java.util.Map<java.lang.Object,java.lang.Object> mapIn,
java.util.Map<java.lang.Object,java.lang.Object> mapOut,
PlanInterpretationNode key,
PlanInterpretationNode value)
invoked at a Map node in a YAML tree, after
PlanInterpreter.applyMapBefore(PlanInterpretationNode, Map),
and after recursing into the value and then key arguments supplied here,
but before inserting it into the mapOut for this node. |
void |
applyYamlPrimitive(PlanInterpretationNode node)
provides an opportunity for an interpreter to change the value at a node,
using
PlanInterpretationNode#get() and PlanInterpretationNode.setNewValue(Object) |
static PlanInterpretationNode |
currentNode()
returns the current node, stored in a thread-local, to populate the dsl field of
BrooklynDslDeferredSupplier instances |
static void |
currentNode(PlanInterpretationNode node)
sets the current node
|
static void |
currentNodeClear() |
java.lang.Object |
evaluate(java.lang.Object f,
boolean deepEvaluation) |
java.lang.Object |
evaluateOn(java.lang.Object o,
FunctionWithArgs f,
boolean deepEvaluation) |
boolean |
isInterestedIn(PlanInterpretationNode node)
guard to prevent any apply calls when an Interpreter is not interested in a node
|
applyListAfter, applyListBefore, applyListEntry, applyMapAfter, applyMapBeforepublic boolean isInterestedIn(PlanInterpretationNode node)
PlanInterpreterpublic static PlanInterpretationNode currentNode()
BrooklynDslDeferredSupplier instancespublic static void currentNode(PlanInterpretationNode node)
public static void currentNodeClear()
public void applyYamlPrimitive(PlanInterpretationNode node)
PlanInterpreterPlanInterpretationNode#get() and PlanInterpretationNode.setNewValue(Object)public boolean applyMapEntry(PlanInterpretationNode node, java.util.Map<java.lang.Object,java.lang.Object> mapIn, java.util.Map<java.lang.Object,java.lang.Object> mapOut, PlanInterpretationNode key, PlanInterpretationNode value)
PlanInterpreterPlanInterpreter.applyMapBefore(PlanInterpretationNode, Map),
and after recursing into the value and then key arguments supplied here,
but before inserting it into the mapOut for this node.
the return value indicates whether to add this key-value to the mapOut. if any interpreters return false, the entry is not added. (callers may modify mapOut to add/change values, or may modify key/value directly.)
applyMapEntry in interface PlanInterpreterapplyMapEntry in class PlanInterpreter.PlanInterpreterAdapterpublic java.lang.Object evaluate(java.lang.Object f,
boolean deepEvaluation)
public java.lang.Object evaluateOn(java.lang.Object o,
FunctionWithArgs f,
boolean deepEvaluation)