public class DescriptiveNode extends Object implements Cloneable
| 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 |
|---|
DescriptiveNode(DescriptiveNode parent,
String name,
Class value) |
DescriptiveNode(DescriptiveNode parent,
String name,
Map attributes,
Class value) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(T child)
adds a ComponentNode as a child of the current node
|
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
|
DescriptiveNode |
clone() |
Iterator<String> |
getAllKeys() |
Iterable<String> |
getAllNames() |
Map |
getAttributes() |
ArrayList<T> |
getChildren() |
Constructor |
getConstructor() |
Object |
getIndirect(Object key) |
String |
getKey() |
String |
getName() |
T |
getNodeByName(String name) |
IndirectMap |
getNodeDict() |
T |
getParent() |
String |
getProtocol() |
Z |
getRealValue() |
String |
getSubsystemName() |
void |
proceduralNodeWalk(Consumer<T> pre,
Consumer<T> post) |
<V> void |
proceduralWalk(Class<V> klass,
Consumer<V> pre,
Consumer<V> post) |
void |
setConstructor() |
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
|
void |
setProtocol(String protocol) |
void |
setSubsystemName(String subsystemName) |
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 DescriptiveNode(DescriptiveNode parent, String name, Class value)
public DescriptiveNode(DescriptiveNode parent, String name, Map attributes, Class value)
public DescriptiveNode clone()
public String getSubsystemName()
public void setSubsystemName(String subsystemName)
public String getProtocol()
public void setProtocol(String protocol)
public void setConstructor()
public Constructor getConstructor()
public 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 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.