public class WalkElement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
maxDepth
The maximum levels from the root to walk, use 0 for no limit.
|
private InputMode |
mode
Input to this walker is the entire tree or the current view.
|
private TreeWalker |
walker
The walker to execute.
|
private boolean |
walkHidden
false to bypass nodes marked as hidden. |
Modifier | Constructor and Description |
---|---|
private |
WalkElement()
Default constructor with no configured walker.
|
|
WalkElement(TreeWalker walker)
Constructor to create an instance which contains the given walker.
|
Modifier and Type | Method and Description |
---|---|
WalkElement |
duplicate()
Make a deep copy of this instance and return that new instance.
|
int |
getMaxDepth()
Get the maximum depth of the walk in levels downward from the root node.
|
InputMode |
getMode()
Get the flag which determines the input to the walk.
|
TreeWalker |
getWalker()
Obtain the walker to be hooked for this stage of the pipeline.
|
boolean |
isWalkHidden()
Get the flag that determines if this walk should invoke hooks for hidden
nodes.
|
void |
setMaxDepth(int maxDepth)
Set the maximum depth of the walk in levels downward from the root node.
|
void |
setMode(InputMode mode)
Set the flag which determines the input to the walk.
|
void |
setWalkHidden(boolean walkHidden)
Set the flag that determines if this walk should invoke hooks for
hidden nodes.
|
private InputMode mode
private int maxDepth
private boolean walkHidden
false
to bypass nodes marked as hidden.private TreeWalker walker
public WalkElement(TreeWalker walker)
walker
- The tree walker to execute.private WalkElement()
public InputMode getMode()
public void setMode(InputMode mode)
mode
- The source of AST nodes for the walk.public int getMaxDepth()
public void setMaxDepth(int maxDepth)
maxDepth
- The maximum levels down from the root to walk.public boolean isWalkHidden()
false
to bypass hidden nodes in the walk.
true
to include hidden nodes in the walk.public void setWalkHidden(boolean walkHidden)
walkHidden
- false
to bypass hidden nodes in the walk.
true
to include hidden nodes in the walk.public TreeWalker getWalker()
public WalkElement duplicate()