Class JAXBWrapperToolImpl
- java.lang.Object
-
- org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl
-
- All Implemented Interfaces:
JAXBWrapperTool
public class JAXBWrapperToolImpl extends Object implements JAXBWrapperTool
The JAXBWrapper tool is used to create a JAXB Object from a series of child objects (wrap) or get the child objects from a JAXB Object (unwrap)
-
-
Constructor Summary
Constructors Constructor Description JAXBWrapperToolImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectunWrap(Object jaxbObject, String childName, PropertyDescriptorPlus pd)Short cut if there is one Object in the JAXB ObjectObject[]unWrap(Object jaxbObject, List<String> childNames)unwrap Returns the list of child objects of the jaxb objectObject[]unWrap(Object jaxbObject, List<String> childNames, Map<String,PropertyDescriptorPlus> pdMap)unwrap Returns the list of child objects of the jaxb objectObjectwrap(Class jaxbClass, String childName, Object childObject, Class declaredClass, PropertyDescriptorPlus pd)wrap Creates a jaxb object that is initialized with one child object.Objectwrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects)wrap Creates a jaxb object that is initialized with the child objects.Objectwrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects, Map<String,Class> declaredClassMap, Map<String,PropertyDescriptorPlus> pdMap)wrap Creates a jaxb object that is initialized with the child objects.
-
-
-
Method Detail
-
unWrap
public Object[] unWrap(Object jaxbObject, List<String> childNames, Map<String,PropertyDescriptorPlus> pdMap) throws JAXBWrapperException
unwrap Returns the list of child objects of the jaxb object- Specified by:
unWrapin interfaceJAXBWrapperTool- Parameters:
jaxbObject- that represents the typechildNames- list of xml child names as StringpdMap- PropertyDescriptor map for this jaxbObject- Returns:
- list of Objects in the same order as the element names.
- Throws:
JAXBWrapperException
-
unWrap
public Object unWrap(Object jaxbObject, String childName, PropertyDescriptorPlus pd) throws JAXBWrapperException
Short cut if there is one Object in the JAXB Object- Specified by:
unWrapin interfaceJAXBWrapperTool- Parameters:
jaxbObject- that represents the typechildName- xml child names as Stringpd- PropertyDescriptor- Returns:
- child Object value
- Throws:
JAXBWrapperException
-
wrap
public Object wrap(Class jaxbClass, String childName, Object childObject, Class declaredClass, PropertyDescriptorPlus pd) throws JAXBWrapperException
wrap Creates a jaxb object that is initialized with one child object. Note that the jaxbClass must be the class the represents the complexType. (It should never be JAXBElement)- Specified by:
wrapin interfaceJAXBWrapperTool- Parameters:
jaxbClass-childName- xml child name as String or null if no childchildObject- component type objectdeclaredClass- declared classpd- PropertyDescriptor for this jaxbObject- Throws:
JAXBWrapperException
-
wrap
public Object wrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects, Map<String,Class> declaredClassMap, Map<String,PropertyDescriptorPlus> pdMap) throws JAXBWrapperException
wrap Creates a jaxb object that is initialized with the child objects. Note that the jaxbClass must be the class the represents the complexType. (It should never be JAXBElement)- Specified by:
wrapin interfaceJAXBWrapperTool- Parameters:
jaxbClass-childNames- list of xml child names as StringchildObjects- , component type objectspdMap- PropertyDescriptor map for this jaxbObject- Throws:
JAXBWrapperException
-
unWrap
public Object[] unWrap(Object jaxbObject, List<String> childNames) throws JAXBWrapperException
Description copied from interface:JAXBWrapperToolunwrap Returns the list of child objects of the jaxb object- Specified by:
unWrapin interfaceJAXBWrapperTool- Parameters:
jaxbObject- that represents the typechildNames- list of xml child names as String- Returns:
- list of Objects in the same order as the element names. Note: This method creates a PropertyDescriptor map; thus it is less performant than the other unWrap method
- Throws:
JAXBWrapperException
-
wrap
public Object wrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects) throws JAXBWrapperException
Description copied from interface:JAXBWrapperToolwrap Creates a jaxb object that is initialized with the child objects. Note that the jaxbClass must be the class the represents the complexType. (It should never be JAXBElement)- Specified by:
wrapin interfaceJAXBWrapperToolchildNames- list of xml child names as StringchildObjects- , component type objects- Throws:
JAXBWrapperException
-
-