2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.databinding.jaxb
Class JAXBWrapperHelper
java.lang.Object
org.apache.tuscany.sca.databinding.jaxb.JAXBWrapperHelper
public class JAXBWrapperHelper
- extends java.lang.Object
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)
Method Summary |
java.lang.Object[] |
unwrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames)
|
java.lang.Object[] |
unwrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> pdMap)
unwrap Returns the list of child objects of the jaxb object |
java.lang.Object |
wrap(java.lang.Class<?> jaxbClass,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects)
|
java.lang.Object |
wrap(java.lang.Class<?> jaxbClass,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> pdMap)
wrap Creates a jaxb object that is initialized with the child objects. |
void |
wrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> pdMap)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXBWrapperHelper
public JAXBWrapperHelper()
unwrap
public java.lang.Object[] unwrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> pdMap)
throws JAXBWrapperException
- unwrap Returns the list of child objects of the jaxb object
- 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
wrap
public java.lang.Object wrap(java.lang.Class<?> jaxbClass,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> 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)
- Parameters:
jaxbClass
- childNames
- list of xml child names as StringchildObjects,
- component type objectspdMap
- PropertyDescriptor map for this jaxbObject
- Throws:
JAXBWrapperException
wrap
public void wrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects,
java.util.Map<java.lang.String,JAXBPropertyDescriptor> pdMap)
unwrap
public java.lang.Object[] unwrap(java.lang.Object jaxbObject,
java.util.List<java.lang.String> childNames)
throws JAXBWrapperException
- Throws:
JAXBWrapperException
wrap
public java.lang.Object wrap(java.lang.Class<?> jaxbClass,
java.util.List<java.lang.String> childNames,
java.util.Map<java.lang.String,java.lang.Object> childObjects)
throws JAXBWrapperException
- Throws:
JAXBWrapperException