|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.model.traverse.AbstractNodeWalker
org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
public abstract class AbstractTreeNodeWalker
base implementation for any tree walker
Field Summary | |
---|---|
protected ClassLoaderCache |
clCache
|
protected Map |
componentBridgeMap
|
protected IConfiguration |
configuration
|
Fields inherited from class org.eclipse.actf.model.traverse.AbstractNodeWalker |
---|
nodeFilters |
Constructor Summary | |
---|---|
AbstractTreeNodeWalker()
|
Method Summary | |
---|---|
protected Object |
getBridgedChild(Object parent)
|
protected Object |
getBridgedParent(Object child)
|
Object |
getChild(Object element,
int index)
default implementation returns the child at the specified index in the array returned by a call to getChildren . |
Object[] |
getFilteredChildren(Object parent)
returns the children of the given node that pass all filteres that were added using the addNodeFilter method. |
Object[] |
getFilteredSuccessorNodes(Object node)
retrieve the direct successors of the given element that pass each of the node filters added via the addNodeFilter method. |
Object[] |
getPredecessorNodes(Object node)
retreave the direct predecessors of the given element. |
Object[] |
getSuccessorNodes(Object node)
retreave the direct successors of the given element. |
boolean |
hasChildren(Object element)
returns whether or not the given node has any children. |
void |
setComponentBridgeMap(Map bridgeMap)
map for associating nodes of heterogeneous types. |
Methods inherited from class org.eclipse.actf.model.traverse.AbstractNodeWalker |
---|
addNodeFilter, removeAllFilters, removeNodeFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.actf.model.traverse.ITreeNodeWalker |
---|
getChildren, getParent |
Methods inherited from interface org.eclipse.actf.model.traverse.INodeWalker |
---|
addNodeFilter, getStartNodes, removeAllFilters, removeNodeFilter |
Field Detail |
---|
protected ClassLoaderCache clCache
protected IConfiguration configuration
protected Map componentBridgeMap
Constructor Detail |
---|
public AbstractTreeNodeWalker()
Method Detail |
---|
public void setComponentBridgeMap(Map bridgeMap)
setComponentBridgeMap
in interface ITreeNodeWalker
protected Object getBridgedChild(Object parent)
protected Object getBridgedParent(Object child)
public boolean hasChildren(Object element) throws InvalidComponentException
hasChildren
in interface ITreeNodeWalker
element
- - node of tree
true
if node has children, false
otherwise
InvalidComponentException
- if component is disposed or otherwise invalidpublic Object[] getSuccessorNodes(Object node) throws InvalidComponentException
getSuccessorNodes
in interface INodeWalker
node
- - node for which direct successors are desired
InvalidComponentException
public Object getChild(Object element, int index) throws InvalidComponentException
getChildren
. This method should be overwritten by clients (if possible)
for the sake of performance.
getChild
in interface ITreeNodeWalker
index
- element
- - node of tree
getChildren
InvalidComponentException
public Object[] getFilteredSuccessorNodes(Object node) throws InvalidComponentException
addNodeFilter
method. The direct successors of the
given element are those elements that are connected to the given element via a single edge and
serve as tails on that edge, permitting the given element to serve as the head.
If no filters have been added or if all filters pass all successor nodes, then this method is
equivalent to getSuccessorNodes
.
getFilteredSuccessorNodes
in interface INodeWalker
node
- - node for which direct successors are desired
InvalidComponentException
INodeWalker.addNodeFilter(INodeFilter)
public Object[] getFilteredChildren(Object parent) throws InvalidComponentException
addNodeFilter
method.
getFilteredChildren
in interface ITreeNodeWalker
parent
- - node of tree
InvalidComponentException
- if component is disposed or otherwise invalidINodeWalker.getFilteredSuccessorNodes(Object)
,
INodeWalker.addNodeFilter(INodeFilter)
public Object[] getPredecessorNodes(Object node) throws InvalidComponentException
getPredecessorNodes
in interface INodeWalker
node
- - node for which direct predecessors are desired
InvalidComponentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |