Interface ConfigurationNodeVisitor
-
- All Known Implementing Classes:
ConfigurationNodeVisitorAdapter
public interface ConfigurationNodeVisitor
Definition of a Visitor interface for a configuration node structure.
The
ConfigurationNode
interface defines avisit()
, which simplifies traversal of a complex node hierarchy. A configuration node implementation must provide a way of visiting all nodes in the current hierarchy. This is a typical application of the GoF Visitor pattern.- Since:
- 1.3
- Version:
- $Id: ConfigurationNodeVisitor.java 1206463 2011-11-26 15:47:08Z oheger $
- Author:
- Commons Configuration team
- See Also:
ConfigurationNode
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
terminate()
Returns a flag whether the actual visit process should be aborted.void
visitAfterChildren(ConfigurationNode node)
Visits the specified node.void
visitBeforeChildren(ConfigurationNode node)
Visits the specified node.
-
-
-
Method Detail
-
visitBeforeChildren
void visitBeforeChildren(ConfigurationNode node)
Visits the specified node. This method is called before eventually existing children of this node are processed.- Parameters:
node
- the node to be visited
-
visitAfterChildren
void visitAfterChildren(ConfigurationNode node)
Visits the specified node. This method is called after eventually existing children of this node have been processed.- Parameters:
node
- the node to be visited
-
terminate
boolean terminate()
Returns a flag whether the actual visit process should be aborted. This method allows a visitor implementation to state that it does not need any further data. It may be used e.g. by visitors that search for a certain node in the hierarchy. After that node was found, there is no need to process the remaining nodes, too.- Returns:
- a flag if the visit process should be stopped
-
-