|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectolg.csv.bean.loader.BeanProcessorLoader<T>
T - the entitypublic class BeanProcessorLoader<T>
Class dedicated to load BeanProcessor instances from an XML file. XML
Root element must be one of the followings :
| Nested Class Summary | |
|---|---|
protected static class |
BeanProcessorLoader.RowBeanTransformerLoader<T>
TransformerLoader adaptation in order to manage with beanRowType elements. |
| Constructor Summary | |
|---|---|
BeanProcessorLoader()
|
|
| Method Summary | ||
|---|---|---|
protected
|
getPropertyParser(Element node,
Class<I> beanClass)
Returns new propertyProcessor which have responsability to set a property to the given bean. |
|
protected BeanProcessor<T> |
getTransformer(Element element,
Class<T> classBean)
Returns new instance of BeanProcessor from XML node. |
|
protected
|
identifyFieldClass(String name,
String className,
Class<B> beanClass)
Return thes concrete class with which the given field must be setted. |
|
BeanProcessor<T> |
load(File file)
Returns the transformer described in the given XML file. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanProcessorLoader()
| Method Detail |
|---|
public BeanProcessor<T> load(File file)
throws LoadException
file - XML file conform to bean-reader xsd declaration. Must be not
null.
LoadException - if an error occurs during loading
protected <B> Class<?> identifyFieldClass(String name,
String className,
Class<B> beanClass)
throws LoadException
B - the bean type that has the fieldname - the field nameclassName - a candidate class, if null identify the concrete
class from its setterbeanClass - the bean class that has the field
LoadException - if the class is not concrete
protected final BeanProcessor<T> getTransformer(Element element,
Class<T> classBean)
throws LoadException
BeanProcessor from XML node.
element - XML node conform to beanReaderType declaration or beanRowType
declarationclassBean - the bean class the transformer has responsability to return.
if null try to load class from class argument of
the given XML element
LoadException - if an error occurs during loading
protected <I> IPropertyProcessor<I> getPropertyParser(Element node,
Class<I> beanClass)
throws XPathExpressionException,
LoadException
I - parent bean typenode - XML node conform to MappingType declarationbeanClass - parent bean class of the property this propertyTransformer set
XPathExpressionException - If an XPath expression cannot be evaluated
LoadException - if an error occurs during loading
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||