public interface ElementVisitor
Modifier and Type | Interface and Description |
---|---|
static class |
ElementVisitor.StoppedException
The StoppedException is thrown by ElementVisitor instances to
immediately exit from element tree processing.
|
Modifier and Type | Method and Description |
---|---|
boolean |
visit(Element parent,
Element target,
ElementMetadata<?,?> metadata)
Called during Element tree traversal to allow the visitor instance
to process an element in the tree.
|
void |
visitComplete(Element parent,
Element target,
ElementMetadata<?,?> metadata)
The visitComplete method is called when traversal for an Element
and all of its nested children has been completed.
|
boolean visit(Element parent, Element target, ElementMetadata<?,?> metadata) throws ElementVisitor.StoppedException
parent
- the parent of the target elementtarget
- the target element being visitedmetadata
- the metadata for the target elementElementVisitor.StoppedException
- if the data model traversal should be stopped
immediately. This may be the result of an unexpected error, or some
visitor implementations may extend this exception type to signal
specific exit conditions.void visitComplete(Element parent, Element target, ElementMetadata<?,?> metadata) throws ElementVisitor.StoppedException
parent
- the parent of the target elementtarget
- the visited elementmetadata
- the metadata for the target elementElementVisitor.StoppedException
- if the data model traversal should be stopped
immediately. This may be the result of an unexpected error, or some
visitor implementations may extend this exception type to signal
specific exit conditions.