Class ElementRefectionBindingHandler
java.lang.Object
org.x4o.xml.element.AbstractElementMetaBase
org.x4o.xml.element.AbstractElementBindingHandler<Object>
org.x4o.xml.eld.lang.ElementRefectionBindingHandler
- All Implemented Interfaces:
ElementBindingHandler
,ElementMetaBase
Binds to objects together with a method found by reflection.
- Version:
- 1.0 Nov 21, 2007
- Author:
- Willem Cazander
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
createChilderen
(Element parentElement, Object parentObject) protected void
createSafeChild
(Element parentElement, Object childObject) Only create child when class matches and regex doesn't exclude it.protected void
createSafeChildLoop
(Element parentElement, Object result) Class<?>[]
Class
<?> Class
<?> Class
<?> void
setAddMethod
(String addMethod) void
setChildClass
(Class<?> childClass) void
setGetMethod
(String getMethod) void
setParentClass
(Class<?> parentClass) void
setProperty
(String property) void
setSkipChilderenClassRegex
(String skipChilderenClassRegex) Methods inherited from class org.x4o.xml.element.AbstractElementBindingHandler
bindChild, createChild, createChilderen
Methods inherited from class org.x4o.xml.element.AbstractElementMetaBase
getDescription, getId, setDescription, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.x4o.xml.element.ElementMetaBase
getDescription, getId, setDescription, setId
-
Constructor Details
-
ElementRefectionBindingHandler
public ElementRefectionBindingHandler()
-
-
Method Details
-
getBindParentClass
- Returns:
- Returns the parent classes which this binding handler can do.
- See Also:
-
getBindChildClasses
- Returns:
- Returns array of child classes which this binding handler can do.
- See Also:
-
bindChild
public void bindChild(Element childElement, Object parentObject, Object childObject) throws ElementBindingHandlerException - Specified by:
bindChild
in classAbstractElementBindingHandler<Object>
- Throws:
ElementBindingHandlerException
- See Also:
-
createChilderen
public void createChilderen(Element parentElement, Object parentObject) throws ElementBindingHandlerException - Specified by:
createChilderen
in classAbstractElementBindingHandler<Object>
- Throws:
ElementBindingHandlerException
- See Also:
-
createSafeChildLoop
protected void createSafeChildLoop(Element parentElement, Object result) throws ElementBindingHandlerException - Throws:
ElementBindingHandlerException
-
createSafeChild
-
getParentClass
- Returns:
- the parentClass
-
setParentClass
- Parameters:
parentClass
- the parentClass to set
-
getChildClass
- Returns:
- the childClass
-
setChildClass
- Parameters:
childClass
- the childClass to set
-
getAddMethod
- Returns:
- the addMethod
-
setAddMethod
- Parameters:
addMethod
- the addMethod to set
-
getGetMethod
- Returns:
- the getMethod
-
setGetMethod
- Parameters:
getMethod
- the getMethod to set
-
getProperty
- Returns:
- the property
-
setProperty
- Parameters:
property
- the property to set
-
getSkipChilderenClassRegex
- Returns:
- the skipChilderenClassRegex
-
setSkipChilderenClassRegex
- Parameters:
skipChilderenClassRegex
- the skipChilderenClassRegex to set
-