|
|||||||||||
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
.
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(String name)
Callback for an element end event. |
protected void |
elementStart(String name,
Object value)
Callback for an element start event. |
protected void |
fireValue(String name,
Object value)
Fires all necessary element start events with the actual element values. |
HierarchicalConfiguration.Node |
getRootNode()
Returns the constructed root node. |
protected String |
openElements(ConfigurationKey keyLast,
ConfigurationKey keyAct,
Configuration config,
Set keySet)
Fires all necessary element start events for the specified key. |
void |
process(Configuration config)
Processes the specified configuration object. |
protected 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 |
Constructor Detail |
public ConfigurationFactory.HierarchicalConfigurationNodeConverter()
Method Detail |
protected void elementStart(String name, Object value)
elementStart
in class HierarchicalConfigurationConverter
name
- the name of the new nodevalue
- the node's valueprotected void elementEnd(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 Iterator reverseIterator(ConfigurationKey key)
key
- the key
protected String openElements(ConfigurationKey keyLast, ConfigurationKey keyAct, Configuration config, Set keySet)
keyLast
- the last processed keykeyAct
- the actual keyconfig
- the configuration to processkeySet
- the set with the processed keys
protected void fireValue(String name, 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 |