Class HierarchicalConfigurationXMLReader.SAXVisitor
java.lang.Object
org.apache.commons.configuration2.tree.ConfigurationNodeVisitorAdapter<T>
org.apache.commons.configuration2.HierarchicalConfigurationXMLReader.SAXVisitor
- All Implemented Interfaces:
ConfigurationNodeVisitor<T>
- Enclosing class:
HierarchicalConfigurationXMLReader<T>
private final class HierarchicalConfigurationXMLReader.SAXVisitor
extends ConfigurationNodeVisitorAdapter<T>
A specialized visitor class for generating SAX events for a hierarchical node structure.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributesfetchAttributes(T node, NodeHandler<T> handler) Returns an object with all attributes for the specified node.private StringnodeName(T node, NodeHandler<T> handler) Helper method for determining the name of a node.booleanChecks if iteration should be terminated.voidvisitAfterChildren(T node, NodeHandler<T> handler) Visits the specified node after its children have been processed.voidvisitBeforeChildren(T node, NodeHandler<T> handler) Visits the specified node.
-
Field Details
-
ATTR_TYPE
Constant for the attribute type.- See Also:
-
-
Constructor Details
-
SAXVisitor
private SAXVisitor()
-
-
Method Details
-
fetchAttributes
Returns an object with all attributes for the specified node.- Parameters:
node- the current nodehandler- the node handler- Returns:
- an object with all attributes of this node
-
nodeName
Helper method for determining the name of a node. If a node has no name (which is true for the root node), the specified default name will be used.- Parameters:
node- the node to be checkedhandler- the node handler- Returns:
- the name for this node
-
terminate
public boolean terminate()Checks if iteration should be terminated. This implementation stops iteration after an exception has occurred.- Specified by:
terminatein interfaceConfigurationNodeVisitor<T>- Overrides:
terminatein classConfigurationNodeVisitorAdapter<T>- Returns:
- a flag if iteration should be stopped
-
visitAfterChildren
Visits the specified node after its children have been processed.- Specified by:
visitAfterChildrenin interfaceConfigurationNodeVisitor<T>- Overrides:
visitAfterChildrenin classConfigurationNodeVisitorAdapter<T>- Parameters:
node- the actual nodehandler- the node handler
-
visitBeforeChildren
Visits the specified node.- Specified by:
visitBeforeChildrenin interfaceConfigurationNodeVisitor<T>- Overrides:
visitBeforeChildrenin classConfigurationNodeVisitorAdapter<T>- Parameters:
node- the actual nodehandler- the node handler
-