|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.bean.loader.CustomLoader
public final class CustomLoader
Class specialized in bean loading from an XML element conformed to XML schema CustomType specification.
Constructor Summary | |
---|---|
private |
CustomLoader()
private constructor to prevent its instantiation. |
Method Summary | ||
---|---|---|
static Object |
getBean(Element node)
Returns an instance of a bean corresponding to XML node parameter. |
|
private static
|
setProperty(AbstractParser<T> parser,
String propertyName,
B bean,
String value)
Set a property on a bean. |
|
private static
|
setProperty(Element node,
B bean)
Sets a property on a bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private CustomLoader()
Method Detail |
---|
public static Object getBean(Element node) throws XPathExpressionException, LoadException
node
- CustomType node as described in XML schema.
XPathExpressionException
- on invalid XPathExpression
LoadException
- if bean class not found or instanciation not possible. In
case of applying properties, a LoadException is thrown when
property class is not found or setter is not found
XPathExpressionException
- on invalid XPathExpressionprivate static <B> void setProperty(Element node, B bean) throws XPathExpressionException, LoadException
B
- the type of the bean.node
- PropertyType Node as described in XML Schema that define the
property to set.bean
- bean that we want to set the property.
XPathExpressionException
- on invalid XPathExpression
LoadException
- if property class not found or setter not foundprivate static <B,T> void setProperty(AbstractParser<T> parser, String propertyName, B bean, String value) throws LoadException
B
- the type of the beanT
- the type of the propertyparser
- the parser to use to parse the valuepropertyName
- the name of the propertybean
- the beanvalue
- the value
LoadException
- if no property setter exists or error occurs on setter
invocation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |