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
URCapProgramNodeInterfaceVisitor is used in conjunction with the TreeNode.traverse(ProgramNodeVisitor) to visit all
nodes in the sub-tree under the node on which TreeNode.traverse(com.ur.urcap.api.domain.program.structure.ProgramNodeVisitor) is called.
The (generic) type parameter must be an interface that a URCap ProgramNodeContribution also implements.
The visitURCapAs(URCAP_PROGRAM_NODE_INTERFACE, int, int) 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.
See also URCapProgramNode.getAs(java.lang.Class<T>).| 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 © 2018. All rights reserved.