protected abstract static class HierarchicalConfiguration.BuilderVisitor extends HierarchicalConfiguration.NodeVisitor
load()
method is
responsible for setting the reference objects. When the configuration
tree is later modified, new nodes do not have a defined reference object.
This visitor class processes all nodes and finds the ones without a
defined reference object. For those nodes the insert()
method is called, which must be defined in concrete sub classes. This
method can perform all steps to integrate the new node into the original
structure.Modifier | Constructor and Description |
---|---|
protected |
HierarchicalConfiguration.BuilderVisitor() |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
insert(HierarchicalConfiguration.Node newNode,
HierarchicalConfiguration.Node parent,
HierarchicalConfiguration.Node sibling1,
HierarchicalConfiguration.Node sibling2)
Inserts a new node into the structure constructed by this builder.
|
void |
visitBeforeChildren(HierarchicalConfiguration.Node node,
ConfigurationKey key)
Visits the specified node before its children have been traversed.
|
terminate, visitAfterChildren
protected HierarchicalConfiguration.BuilderVisitor()
public void visitBeforeChildren(HierarchicalConfiguration.Node node, ConfigurationKey key)
visitBeforeChildren
in class HierarchicalConfiguration.NodeVisitor
node
- the node to visitkey
- the current keyprotected abstract Object insert(HierarchicalConfiguration.Node newNode, HierarchicalConfiguration.Node parent, HierarchicalConfiguration.Node sibling1, HierarchicalConfiguration.Node sibling2)
Node
object; if it is not null , it is passed
to the node's setReference()
method.newNode
- the node to be insertedparent
- the parent nodesibling1
- the sibling after which the node is to be inserted;
can be null if the new node is going to be the first child
nodesibling2
- the sibling before which the node is to be inserted;
can be null if the new node is going to be the last child
nodeCopyright © 2001–2013 The Apache Software Foundation. All rights reserved.