org.apache.commons.configuration2.tree

## Interface ReferenceNodeHandler

- All Superinterfaces:
    NodeHandler<ImmutableNode>

      public interface ReferenceNodeHandler
      extends NodeHandler<ImmutableNode>

  An extension of the `NodeHandler` interface which allows access to so-called references stored for a node.

  Some specialized configuration implementations needs to store additional data for the nodes representing configuration properties. This interface provides methods for querying this data. For instance, it is possible to query a reference object stored for a specific node.

  `InMemoryNodeModel` supports references. It can be queried for a `ReferenceNodeHandler` which can then be used for dealing with references.

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getReference(ImmutableNode node)` Returns the reference object associated with the specified node.
    `List<Object>` | `removedReferences()` Returns a list with the reference objects for nodes which have been removed.

    - ### Methods inherited from interface org.apache.commons.configuration2.tree.NodeHandler

      `getAttributes, getAttributeValue, getChild, getChildren, getChildren, getChildrenCount, getMatchingChildren, getMatchingChildrenCount, getParent, getRootNode, getValue, hasAttributes, indexOfChild, isDefined, nodeName`

- - ### Method Detail

    - #### getReference

          Object getReference(ImmutableNode node)

      Returns the reference object associated with the specified node. If no reference data is associated with this node, result is null.
      Parameters:
        `node` - the node in question
      Returns:
        the reference object for this node or null

    - #### removedReferences

          List<Object> removedReferences()

      Returns a list with the reference objects for nodes which have been removed. Whenever a node associated with a reference object is removed from the nodes structure managed by the owning model, the reference object is recorded. This is necessary for instance to free some resources. With this method all recorded reference objects can be queried. They are typically returned in the order in which they have been removed.
      Returns:
        a list with reference objects for nodes removed from the model

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