
public class EffectiveNode extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map |
attributes
for a DescriptiveNode the description of parameters
not used for EffectiveNode (but might be with a copy of parameters description)
|
protected ArrayList<T> |
children |
protected String |
key
the key of the node
|
protected static Logger |
logger |
protected String |
name
todo: righ now key and name should be the same ..
|
protected IndirectMap<String,org.lsst.ccs.description.ComponentNode> |
nodeDict
A dictionary of all nodes in the tree.
|
protected T |
parent |
protected Z |
realValue
for DescriptiveNode the Class of the future object
for an EffectiveNode the actual object
|
| Constructor and Description |
|---|
EffectiveNode(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry,
String name,
String key,
Object value,
DescriptiveNode descriptiveNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(T child)
adds a ComponentNode as a child of the current node
|
void |
adoptOrphans(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry,
ArrayList<EffectiveNode> children,
EffectiveNode parent) |
protected void |
checkDict(T parent,
String name,
Map attributes)
prepare the setDict call
Beware should be used only in top-down build of the tree
|
Iterator<String> |
getAllKeys() |
Iterable<String> |
getAllNames() |
Map |
getAttributes() |
ArrayList<T> |
getChildren() |
Object |
getIndirect(Object key) |
String |
getKey() |
String |
getName() |
T |
getNodeByName(String name) |
IndirectMap |
getNodeDict() |
T |
getParent() |
Z |
getRealValue() |
void |
proceduralNodeWalk(Consumer<T> pre,
Consumer<T> post) |
<V> void |
proceduralWalk(Class<V> klass,
Consumer<V> pre,
Consumer<V> post) |
protected void |
setDict(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry,
String name,
Map attributes)
set the dictionary of the node and set the entry of this Node in the Dictionary
|
String |
toString() |
<V> TreeWalkerDiag |
treeWalk(Class<V> klass,
Function<V,TreeWalkerDiag> func,
Consumer<V> post)
Walks the components tree recursively, applying rules of TreeWalkerDiag (the walk
can be interrupted by HANDLING_CHILDREN (the code is not invoked on children)
or STOP (the code abruptly ends)
|
protected static final Logger logger
protected IndirectMap<String,org.lsst.ccs.description.ComponentNode> nodeDict
protected String key
protected T extends org.lsst.ccs.description.ComponentNode<T,Z> parent
protected ArrayList<T extends org.lsst.ccs.description.ComponentNode<T,Z>> children
protected String name
protected Z realValue
protected Map attributes
public EffectiveNode(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry, String name, String key, Object value, DescriptiveNode descriptiveNode)
public void adoptOrphans(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry, ArrayList<EffectiveNode> children, EffectiveNode parent) throws NullPointerException, IllegalArgumentException
registry - children - parent - NullPointerExceptionIllegalArgumentExceptionpublic IndirectMap getNodeDict()
protected void checkDict(T parent,
String name,
Map attributes)
parent - name - attributes - protected void setDict(IndirectMap<String,org.lsst.ccs.description.ComponentNode> registry, String name, Map attributes)
registry - name - attributes - public String getName()
public Z getRealValue()
public T getNodeByName(String name)
public Map getAttributes()
public String getKey()
public ArrayList<T> getChildren()
public void addChild(T child)
throws NullPointerException
child - to be added to the nodeNullPointerException - if child is nullpublic T getParent()
public <V> TreeWalkerDiag treeWalk(Class<V> klass, Function<V,TreeWalkerDiag> func, Consumer<V> post)
func - post - TreeWalkerDiag indicating how the next Configurable
should be handledCopyright © 2016 LSST. All rights reserved.