## org.apache.commons.configuration
Class HierarchicalConfiguration.DefinedKeysVisitor

    java.lang.Object
      org.apache.commons.configuration.tree.ConfigurationNodeVisitorAdapter
          org.apache.commons.configuration.HierarchicalConfiguration.DefinedKeysVisitor

All Implemented Interfaces:
  ConfigurationNodeVisitor

Enclosing class:
  HierarchicalConfiguration

     class HierarchicalConfiguration.DefinedKeysVisitor

extends ConfigurationNodeVisitorAdapter

A specialized visitor that fills a list with keys that are defined in a node hierarchy.

Constructor Summary
`HierarchicalConfiguration.DefinedKeysVisitor()` Default constructor.
`HierarchicalConfiguration.DefinedKeysVisitor(String prefix)` Creates a new `DefinedKeysVisitor` instance and sets the prefix for the keys to fetch.

Method Summary
`Set` `getKeyList()` Returns the list with all defined keys.
`void` `visitAfterChildren(ConfigurationNode node)` Visits the node after its children has been processed.
`void` `visitBeforeChildren(ConfigurationNode node)` Visits the specified node.

Methods inherited from class org.apache.commons.configuration.tree.ConfigurationNodeVisitorAdapter
`terminate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HierarchicalConfiguration.DefinedKeysVisitor

    public HierarchicalConfiguration.DefinedKeysVisitor()

  Default constructor.

### HierarchicalConfiguration.DefinedKeysVisitor

    public HierarchicalConfiguration.DefinedKeysVisitor(String prefix)

  Creates a new `DefinedKeysVisitor` instance and sets the prefix for the keys to fetch.

  Parameters:
    `prefix` - the prefix

Method Detail

### getKeyList

    public Set getKeyList()

  Returns the list with all defined keys.

  Returns:
    the list with the defined keys

### visitAfterChildren

    public void visitAfterChildren(ConfigurationNode node)

  Visits the node after its children has been processed. Removes this node's key from the stack.

  Specified by:
    `visitAfterChildren` in interface `ConfigurationNodeVisitor`
  Overrides:
    `visitAfterChildren` in class `ConfigurationNodeVisitorAdapter`
  Parameters:
    `node` - the node

### visitBeforeChildren

    public void visitBeforeChildren(ConfigurationNode node)

  Visits the specified node. If this node has a value, its key is added to the internal list.

  Specified by:
    `visitBeforeChildren` in interface `ConfigurationNodeVisitor`
  Overrides:
    `visitBeforeChildren` in class `ConfigurationNodeVisitorAdapter`
  Parameters:
    `node` - the node to be visited

Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.