public class PlanInterpretationNode extends Object
PlanInterpreter instances, doing the recursive work| Modifier and Type | Class and Description |
|---|---|
static class |
PlanInterpretationNode.Role |
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
changed |
protected PlanInterpretationContext |
context |
protected boolean |
excluded |
protected boolean |
immutable |
protected Object |
newValue |
protected Object |
originalValue |
protected PlanInterpretationNode |
parent |
protected PlanInterpretationNode.Role |
roleInParent |
| Modifier | Constructor and Description |
|---|---|
|
PlanInterpretationNode(PlanInterpretationContext context)
creates a root node with
apply() called |
protected |
PlanInterpretationNode(PlanInterpretationNode parent,
PlanInterpretationNode.Role roleInParent,
Object originalItem)
internal use: creates an internal node on which
apply() has *not* been called |
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply() |
protected void |
applyToIterable() |
protected void |
applyToMap() |
protected void |
applyToYamlPrimitive() |
PlanInterpretationNode |
exclude()
indicates that a node should no longer be translated
|
PlanInterpretationContext |
getContext() |
Object |
getNewValue() |
Object |
getOriginalValue() |
PlanInterpretationNode |
getParent() |
PlanInterpretationNode.Role |
getRoleInParent() |
void |
immutable() |
boolean |
isChanged() |
boolean |
isExcluded() |
boolean |
matchesLiteral(String target)
convenience for interpreters, tests if nodes are not excluded, and if not:
for string nodes, true iff the current value equals the given target;
for nodes which are currently maps or lists,
true iff not excluded and the value contains such an entry (key, in the case of map)
|
boolean |
matchesPrefix(String prefix)
convenience for interpreters, tests if nodes are not excluded, and if not:
for string nodes, true iff the current value starts with the given prefix;
for nodes which are currently maps or lists,
true iff not excluded and the value contains such an entry (key, in the case of map)
|
protected PlanInterpretationNode |
newPlanInterpretation(PlanInterpretationNode parent,
PlanInterpretationNode.Role roleInParent,
Object item) |
PlanInterpretationNode |
setNewValue(Object newItem) |
protected final PlanInterpretationNode parent
protected final PlanInterpretationNode.Role roleInParent
protected final Object originalValue
protected final PlanInterpretationContext context
protected Object newValue
protected Boolean changed
protected boolean excluded
protected boolean immutable
public PlanInterpretationNode(PlanInterpretationContext context)
apply() calledprotected PlanInterpretationNode(PlanInterpretationNode parent, PlanInterpretationNode.Role roleInParent, Object originalItem)
apply() has *not* been calledpublic PlanInterpretationContext getContext()
public PlanInterpretationNode getParent()
public PlanInterpretationNode.Role getRoleInParent()
protected void apply()
public boolean matchesLiteral(String target)
public boolean matchesPrefix(String prefix)
public Object getOriginalValue()
public Object getNewValue()
public boolean isChanged()
public boolean isExcluded()
public PlanInterpretationNode exclude()
public PlanInterpretationNode setNewValue(Object newItem)
protected PlanInterpretationNode newPlanInterpretation(PlanInterpretationNode parent, PlanInterpretationNode.Role roleInParent, Object item)
protected void applyToMap()
protected void applyToIterable()
protected void applyToYamlPrimitive()
public void immutable()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.