|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.HierarchicalConfigurationConverter
org.apache.commons.configuration.ConfigurationFactory.HierarchicalConfigurationNodeConverter
A specialized HierarchicalConfigurationConverter
class
that creates a HierarchicalConfiguration
root node from
an arbitrary Configuration
object. This class is used to
add additional configuration objects to the hierarchical configuration
managed by the ConfigurationBuilder
.
Field Summary | |
private java.util.Stack |
nodes
A stack for constructing the hierarchy. |
private HierarchicalConfiguration.Node |
root
Stores the root node. |
Constructor Summary | |
ConfigurationFactory.HierarchicalConfigurationNodeConverter()
Default constructor. |
Method Summary | |
protected void |
closeElements(ConfigurationKey keyLast,
ConfigurationKey keyAct)
Fires all necessary element end events for the specified keys. |
protected void |
elementEnd(java.lang.String name)
Callback for an element end event. |
protected void |
elementStart(java.lang.String name,
java.lang.Object value)
Callback for an element start event. |
protected void |
fireValue(java.lang.String name,
java.lang.Object value)
Fires all necessary element start events with the actual element values. |
HierarchicalConfiguration.Node |
getRootNode()
Returns the constructed root node. |
protected java.lang.String |
openElements(ConfigurationKey keyLast,
ConfigurationKey keyAct)
Fires all necessary element start events for the specified key. |
void |
process(Configuration config)
Processes the specified configuration object. |
protected java.util.Iterator |
reverseIterator(ConfigurationKey key)
Helper method for determining a reverse iterator for the specified key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Stack nodes
private HierarchicalConfiguration.Node root
Constructor Detail |
public ConfigurationFactory.HierarchicalConfigurationNodeConverter()
Method Detail |
protected void elementStart(java.lang.String name, java.lang.Object value)
elementStart
in class HierarchicalConfigurationConverter
name
- the name of the new nodevalue
- the node's valueprotected void elementEnd(java.lang.String name)
elementEnd
in class HierarchicalConfigurationConverter
name
- the name of the elementpublic HierarchicalConfiguration.Node getRootNode()
public void process(Configuration config)
elementStart()
and
elementEnd()
methods.
config
- the configuration to be processedprotected void closeElements(ConfigurationKey keyLast, ConfigurationKey keyAct)
keyLast
- the last processed keykeyAct
- the actual keyprotected java.util.Iterator reverseIterator(ConfigurationKey key)
key
- the key
protected java.lang.String openElements(ConfigurationKey keyLast, ConfigurationKey keyAct)
keyLast
- the last processed keykeyAct
- the actual key
protected void fireValue(java.lang.String name, java.lang.Object value)
name
- the name of the actual elementvalue
- the element's value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |