|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.configuration.ConfigurationUtil
public class ConfigurationUtil
This class has a bunch of utility methods to work with configuration objects.
Constructor Summary | |
---|---|
private |
ConfigurationUtil()
Private constructor to block instantiation. |
Method Summary | |
---|---|
private static boolean |
areAttributesEqual(org.apache.avalon.framework.configuration.Configuration c1,
org.apache.avalon.framework.configuration.Configuration c2)
Return true if the attributes of both configurations are equal. |
private static boolean |
areChildrenEqual(org.apache.avalon.framework.configuration.Configuration c1,
org.apache.avalon.framework.configuration.Configuration c2)
Return true if the children of both configurations are equal. |
private static boolean |
areValuesEqual(org.apache.avalon.framework.configuration.Configuration c1,
org.apache.avalon.framework.configuration.Configuration c2)
Return true if the values of two configurations are equal. |
private static org.w3c.dom.Element |
createElement(org.w3c.dom.Document document,
org.apache.avalon.framework.configuration.Configuration configuration)
Create an DOM Element from a Configuration
object. |
static boolean |
equals(org.apache.avalon.framework.configuration.Configuration c1,
org.apache.avalon.framework.configuration.Configuration c2)
Test to see if two Configuration's can be considered the same. |
private static boolean |
findMatchingChild(org.apache.avalon.framework.configuration.Configuration c,
java.util.ArrayList matchAgainst)
Return true if find a matching child and remove child from list. |
static org.apache.avalon.framework.configuration.Configuration |
toConfiguration(org.w3c.dom.Element element)
Convert a DOM Element tree into a configuration tree. |
static org.w3c.dom.Element |
toElement(org.apache.avalon.framework.configuration.Configuration configuration)
Convert a configuration tree into a DOM Element tree. |
static java.lang.String |
toString(org.apache.avalon.framework.configuration.Configuration configuration)
Serialize the configuration object to a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private ConfigurationUtil()
Method Detail |
---|
public static org.apache.avalon.framework.configuration.Configuration toConfiguration(org.w3c.dom.Element element)
element
- the DOM Element
public static org.w3c.dom.Element toElement(org.apache.avalon.framework.configuration.Configuration configuration)
configuration
- the configuration object
public static java.lang.String toString(org.apache.avalon.framework.configuration.Configuration configuration)
DefaultConfigurationSerializer.serialize(Configuration)
lets the caller
handle exceptions.
configuration
- Configuration instance to serialize
Configuration
,
or an error message.public static boolean equals(org.apache.avalon.framework.configuration.Configuration c1, org.apache.avalon.framework.configuration.Configuration c2)
c1
- Configuration to testc2
- Configuration to test
private static boolean areChildrenEqual(org.apache.avalon.framework.configuration.Configuration c1, org.apache.avalon.framework.configuration.Configuration c2)
c1
- configuration1c2
- configuration2
private static boolean findMatchingChild(org.apache.avalon.framework.configuration.Configuration c, java.util.ArrayList matchAgainst)
c
- the configurationmatchAgainst
- the list of items to match against
private static boolean areAttributesEqual(org.apache.avalon.framework.configuration.Configuration c1, org.apache.avalon.framework.configuration.Configuration c2)
c1
- configuration1c2
- configuration2
private static boolean areValuesEqual(org.apache.avalon.framework.configuration.Configuration c1, org.apache.avalon.framework.configuration.Configuration c2)
c1
- configuration1c2
- configuration2
private static org.w3c.dom.Element createElement(org.w3c.dom.Document document, org.apache.avalon.framework.configuration.Configuration configuration)
Element
from a Configuration
object.
document
- the DOM documentconfiguration
- the configuration to convert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |