ch.javasoft.xml.config
Class ConstConfigParser

java.lang.Object
  extended by ch.javasoft.xml.config.ConstConfigParser

public class ConstConfigParser
extends Object

The ConstConfigParser parses the configuration for constants. Supported are primitive types, classes of the java.lang package without package name and fully qualified class names. The class must have a public constructor accepting a single string argument.


Nested Class Summary
static class ConstConfigParser.XmlAttribute
           
static class ConstConfigParser.XmlElement
           
 
Constructor Summary
ConstConfigParser()
           
 
Method Summary
static boolean parseBooleanConstant(Element constElement)
           
static
<T> T
parseConstant(Class<T> type, Element constElement)
           
static Object parseConstant(Element constElement)
           
static double parseDoubleConstant(Element constElement)
           
static float parseFloatConstant(Element constElement)
           
static int parseIntConstant(Element constElement)
           
static long parseLongConstant(Element constElement)
           
static String parseStringConstant(Element constElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstConfigParser

public ConstConfigParser()
Method Detail

parseConstant

public static Object parseConstant(Element constElement)
                            throws XmlConfigException
Throws:
XmlConfigException

parseIntConstant

public static int parseIntConstant(Element constElement)
                            throws XmlConfigException
Throws:
XmlConfigException

parseLongConstant

public static long parseLongConstant(Element constElement)
                              throws XmlConfigException
Throws:
XmlConfigException

parseFloatConstant

public static float parseFloatConstant(Element constElement)
                                throws XmlConfigException
Throws:
XmlConfigException

parseDoubleConstant

public static double parseDoubleConstant(Element constElement)
                                  throws XmlConfigException
Throws:
XmlConfigException

parseBooleanConstant

public static boolean parseBooleanConstant(Element constElement)
                                    throws XmlConfigException
Throws:
XmlConfigException

parseStringConstant

public static String parseStringConstant(Element constElement)
                                  throws XmlConfigException
Throws:
XmlConfigException

parseConstant

public static <T> T parseConstant(Class<T> type,
                                  Element constElement)
                       throws XmlConfigException
Throws:
XmlConfigException