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 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 Attributes
fetchAttributes
(T node, NodeHandler<T> handler) Returns an object with all attributes for the specified node.private String
nodeName
(T node, NodeHandler<T> handler) Helper method for determining the name of a node.boolean
Checks if iteration should be terminated.void
visitAfterChildren
(T node, NodeHandler<T> handler) Visits the specified node after its children have been processed.void
visitBeforeChildren
(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
-
visitAfterChildren
Visits the specified node after its children have been processed.- Specified by:
visitAfterChildren
in interfaceConfigurationNodeVisitor<T>
- Overrides:
visitAfterChildren
in classConfigurationNodeVisitorAdapter<T>
- Parameters:
node
- the actual nodehandler
- the node handler
-
visitBeforeChildren
Visits the specified node.- Specified by:
visitBeforeChildren
in interfaceConfigurationNodeVisitor<T>
- Overrides:
visitBeforeChildren
in classConfigurationNodeVisitorAdapter<T>
- Parameters:
node
- the actual nodehandler
- the node handler
-
terminate
public boolean terminate()Checks if iteration should be terminated. This implementation stops iteration after an exception has occurred.- Specified by:
terminate
in interfaceConfigurationNodeVisitor<T>
- Overrides:
terminate
in classConfigurationNodeVisitorAdapter<T>
- Returns:
- a flag if iteration should be stopped
-
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
-