org.apache.commons.configuration2.tree

## Class ConfigurationNodeVisitorAdapter<T>

- java.lang.Object
- - org.apache.commons.configuration2.tree.ConfigurationNodeVisitorAdapter<T>

- Type Parameters:
    `T` - the type of the nodes processed by this visitor
  All Implemented Interfaces:
    ConfigurationNodeVisitor<T>
  Direct Known Subclasses:
    BaseHierarchicalConfiguration.BuilderVisitor

      public class ConfigurationNodeVisitorAdapter<T>
      extends Object
      implements ConfigurationNodeVisitor<T>

  A simple adapter class that simplifies writing custom node visitor implementations.

  This class provides dummy implementations for the methods defined in the `ConfigurationNodeVisitor` interface. Derived classes only need to override the methods they really need.

  Version:
    $Id: ConfigurationNodeVisitorAdapter.java 1624601 2014-09-12 18:04:36Z oheger $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurationNodeVisitorAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `terminate()` Returns a flag whether the current visit process should be aborted.
    `void` | `visitAfterChildren(T node, NodeHandler<T> handler)` Visits the specified node after after its children - if existing - have been processed.
    `void` | `visitBeforeChildren(T node, NodeHandler<T> handler)` Visits the specified node before the children of this node - if existing - are processed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigurationNodeVisitorAdapter

          public ConfigurationNodeVisitorAdapter()

  - ### Method Detail

    - #### visitBeforeChildren

          public void visitBeforeChildren(T node,
                                          NodeHandler<T> handler)

      Visits the specified node before the children of this node - if existing - are processed. Empty dummy implementation of this interface method.
      Specified by:
        `visitBeforeChildren` in interface `ConfigurationNodeVisitor<T>`
      Parameters:
        `node` - the node to be visited
        `handler` - the `NodeHandler`

    - #### visitAfterChildren

          public void visitAfterChildren(T node,
                                         NodeHandler<T> handler)

      Visits the specified node after after its children - if existing - have been processed. Empty dummy implementation of this interface method.
      Specified by:
        `visitAfterChildren` in interface `ConfigurationNodeVisitor<T>`
      Parameters:
        `node` - the node to be visited
        `handler` - the `NodeHandler`

    - #### terminate

          public boolean terminate()

      Returns a flag whether the current 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. This method is called after each visited node. A result of true indicates that the current iteration is to be aborted. This implementation returns always false; this means that all nodes in the current hierarchy are traversed.
      Specified by:
        `terminate` in interface `ConfigurationNodeVisitor<T>`
      Returns:
        a flag if the visit process should be stopped

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.