HashTreeTraverser
TreeClonerNoTimer
public class TreeCloner extends Object implements HashTreeTraverser
NoThreadClone
by default.Constructor | Description |
---|---|
TreeCloner() |
Clone the test tree, honouring NoThreadClone markers.
|
TreeCloner(boolean honourNoThreadClone) |
Clone the test tree.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addNode(Object node,
HashTree subTree) |
The tree traverses itself depth-first, calling addNode for each object it
encounters as it goes.
|
protected Object |
addNodeToTree(Object node) |
|
ListedHashTree |
getClonedTree() |
|
void |
processPath() |
Process path is called when a leaf is reached.
|
void |
subtractNode() |
Indicates traversal has moved up a step, and the visitor should remove
the top node from its stack structure.
|
public TreeCloner()
public TreeCloner(boolean honourNoThreadClone)
honourNoThreadClone
- set false to clone NoThreadClone nodes as wellpublic final void addNode(Object node, HashTree subTree)
addNode
in interface HashTreeTraverser
node
- the node currently encounteredsubTree
- the HashTree under the node encounteredprotected Object addNodeToTree(Object node)
node
- Node to add to tree or notpublic void subtractNode()
HashTreeTraverser
subtractNode
in interface HashTreeTraverser
public ListedHashTree getClonedTree()
public void processPath()
HashTreeTraverser
HashTreeTraverser.subtractNode()
call. This is a callback method, and should
not be called except by a HashTree during traversal.processPath
in interface HashTreeTraverser
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.