public class ComponentNode<T extends ComponentNode<T>> extends Object implements Serializable, TreeNode
| 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 ComponentNode |
calls
a node containing special subnodes that describe method calls to be operated later on object value
(may be changed to a special structure)
|
protected ArrayList<T> |
children |
protected String |
key
the key of the node
|
protected String |
name
todo: righ now key and name should be the same ..
|
protected IndirectMap<String,Object> |
nodeDict
A dictionary of all nodes in the tree.
|
protected boolean |
orphan
indicate if this node is waiting for connection to a tree.
|
protected T |
parent |
protected Object |
realValue
for DescriptiveNode the Class of the future object (or an ImplPlaceHolder)
for an EffectiveNode the actual object
|
protected boolean |
root
indicates if this is a root node
|
protected String |
simpleDescription |
| Modifier | Constructor and Description |
|---|---|
protected |
ComponentNode(IndirectMap<String,Object> registry,
Object name,
String key,
Map attributes,
Object value)
this constructor to be used by EffectiveNode (does not use checkDict!)
|
|
ComponentNode(T parent,
Object name) |
|
ComponentNode(T parent,
Object name,
Map attributes) |
|
ComponentNode(T parent,
Object name,
Map attributes,
Object value) |
|
ComponentNode(T parent,
Object name,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(T child)
adds a ComponentNode as a child of the current node
|
Object |
calls(Object callDescription)
a ComponentNode might have a "calls" method which takes a Closure as parameter.
|
protected void |
checkDict(T parent,
Object name,
Map attributes)
prepare the setDict call
Beware should be used only in top-down build of the tree
|
Enumeration |
children() |
Iterator<String> |
getAllKeys() |
Iterable<String> |
getAllNames() |
boolean |
getAllowsChildren() |
Map |
getAttributes() |
ComponentNode |
getCalls() |
TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
ArrayList<T> |
getChildren() |
int |
getIndex(TreeNode node) |
Object |
getIndirect(Object key) |
String |
getKey() |
String |
getName() |
Object |
getNodeByName(String name) |
IndirectMap |
getNodeDict() |
T |
getParent() |
Object |
getRealValue() |
String |
getSimpleDescription() |
boolean |
isLeaf() |
boolean |
isOrphan() |
boolean |
isRoot() |
ComponentNode |
setCalls(ComponentNode callsNode) |
protected void |
setDict(IndirectMap<String,Object> registry,
Object name,
Map attributes)
set the dictionary of the node and set the entry of this Node in the Dictionary
|
void |
setNodeDict(IndirectMap<String,Object> registry)
Deprecated.
|
void |
setRoot(boolean isRoot) |
void |
setSimpleDescription(String simpleDescription) |
String |
toString() |
protected IndirectMap<String,Object> nodeDict
protected boolean root
protected boolean orphan
protected ComponentNode calls
protected String key
protected T extends ComponentNode<T> parent
protected ArrayList<T extends ComponentNode<T>> children
protected String name
protected String simpleDescription
protected Object realValue
protected Map attributes
public IndirectMap getNodeDict()
@Deprecated public void setNodeDict(IndirectMap<String,Object> registry)
protected void checkDict(T parent, Object name, Map attributes)
parent - name - attributes - protected void setDict(IndirectMap<String,Object> registry, Object name, Map attributes)
registry - name - attributes - public Object calls(Object callDescription)
callDescription - public ComponentNode setCalls(ComponentNode callsNode)
public boolean isRoot()
public void setRoot(boolean isRoot)
public boolean isOrphan()
public ComponentNode getCalls()
public String getName()
public String getSimpleDescription()
public void setSimpleDescription(String simpleDescription)
public Object 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 TreeNode getChildAt(int childIndex)
getChildAt in interface TreeNodepublic int getChildCount()
getChildCount in interface TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface TreeNodepublic Enumeration children()
Copyright © 2015 LSST. All rights reserved.