URCAP_PROGRAM_NODE_INTERFACE - The interface a URCap ProgramNodeContribution also implements. Do not use
ProgramNodeContribution (or an extension/implementation thereof) nor
Object, otherwise an IllegalArgumentException is thrown when a
URCap program node is encountered during traversal.public abstract class URCapProgramNodeInterfaceVisitor<URCAP_PROGRAM_NODE_INTERFACE> extends ProgramNodeVisitor
This class is used in conjunction with the TreeNode.traverse(ProgramNodeVisitor) method to visit all nodes in
the sub-tree under the node on which TreeNode.traverse(ProgramNodeVisitor) is called.
The (generic) type parameter must be an interface that a URCap ProgramNodeContribution also implements. The
visitURCapAs(Object, int, int) method will be called when such a program node
is encountered.
All the visit-methods in the ProgramNodeVisitor superclass can still be overridden and will be called as usual.
URCapProgramNode.getAs(Class).| Constructor and Description |
|---|
URCapProgramNodeInterfaceVisitor() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
visitURCapAs(URCAP_PROGRAM_NODE_INTERFACE urCapProgramNode,
int index,
int depth)
This method is called whenever a URCap program node implementing the interface specified is encountered.
|
public abstract void visitURCapAs(URCAP_PROGRAM_NODE_INTERFACE urCapProgramNode, int index, int depth)
urCapProgramNode - The URCap program node represented as the interface specified.index - Zero-based index among the program node's siblings (at this depth).depth - Relative depth to the node calling the TreeNode.traverse(ProgramNodeVisitor) (calling node is
at depth 0).Copyright © 2021. All rights reserved.