public class BeanUtil extends Object
Constructor and Description |
---|
BeanUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addInstanceTypeAttribute(org.apache.axiom.om.OMFactory fac,
org.apache.axiom.om.OMElement element,
Object resObject,
TypeTable typeTable)
Adds the instance type attribute to the passed OMElement.
|
static org.apache.axiom.om.OMElement |
convertDOMtoOM(org.apache.axiom.om.OMFactory fac,
Object document)
Convert DOM Document to a OMElement.
|
static org.apache.axiom.om.OMDocument |
convertOMtoDOM(org.apache.axiom.om.OMContainer omElement)
Gets the DOOM implementation of org.w3c.dom.Document
|
static Object |
deserialize(Class beanClass,
org.apache.axiom.om.OMElement beanElement,
MultirefHelper helper,
ObjectSupplier objectSupplier) |
static Object |
deserialize(Class beanClass,
org.apache.axiom.om.OMElement beanElement,
ObjectSupplier objectSupplier,
String arrayLocalName) |
static Object[] |
deserialize(org.apache.axiom.om.OMElement response,
Object[] javaTypes,
ObjectSupplier objectSupplier)
To get JavaObjects from XML element , the element most of the time contains only one element
in that case that element will be converted to the JavaType specified by the javaTypes array
The algo is as follows, get the childerns of the response element , and if it conatian more
than one element then check the retuen type of that element and conver that to corresponding
JavaType
|
static Object[] |
deserialize(org.apache.axiom.om.OMElement response,
Object[] javaTypes,
ObjectSupplier objectSupplier,
String[] parameterNames,
Method method) |
static org.apache.axiom.om.OMElement |
getCollectionElement(org.apache.axiom.om.OMFactory fac,
Type type,
Collection results,
String name,
String innerName,
QName elementQName,
TypeTable typeTable,
boolean elementFormDefault)
Gets the collection element.
|
static List<org.apache.axiom.om.OMElement> |
getMapElement(org.apache.axiom.om.OMFactory fac,
Type type,
Map results,
TypeTable typeTable,
boolean elementFormDefault)
This method convert a instance of java.util.Map into
OM object model for serialization.
|
static org.apache.axiom.om.OMElement |
getOMElement(QName opName,
Object[] args,
QName partName,
boolean qualifed,
TypeTable typeTable) |
static XMLStreamReader |
getPullParser(Object beanObject)
to get the pull parser for a given bean object , generate the wrpper element using class
name
|
static XMLStreamReader |
getPullParser(Object beanObject,
QName beanName,
TypeTable typeTable,
boolean qualified,
boolean processingDocLitBare)
To Serilize Bean object this method is used, this will create an object array using given
bean object
|
static String |
getUniquePrefix()
increments the namespace counter and returns a new prefix
|
static String |
getUniquePrifix()
Deprecated.
Please use getUniquePrefix
|
static Object |
processEnumObject(Class classType,
org.apache.axiom.om.OMElement omElement) |
static Collection<Object> |
processGenericCollection(org.apache.axiom.om.OMElement omElement,
org.apache.axiom.om.OMElement[] toReturn,
Type generictype,
MultirefHelper helper,
ObjectSupplier objectSupplier,
Iterator parts,
boolean bare)
Process collection.
|
static Collection<Object> |
processGenericCollection(org.apache.axiom.om.OMElement omElement,
Type generictype,
MultirefHelper helper,
ObjectSupplier objectSupplier)
Process generic collection.
|
static Map<Object,Object> |
processGenericsMapElement(Type[] parameterArgTypes,
org.apache.axiom.om.OMElement omElement,
MultirefHelper helper,
Iterator parts,
ObjectSupplier objectSupplier,
Type genericType)
This method deserialize OM model in to a instance of java.util.Map
|
static Object |
processObject(org.apache.axiom.om.OMElement omElement,
Class classType,
MultirefHelper helper,
boolean isArrayType,
ObjectSupplier objectSupplier,
Type generictype) |
public static XMLStreamReader getPullParser(Object beanObject, QName beanName, TypeTable typeTable, boolean qualified, boolean processingDocLitBare)
public static XMLStreamReader getPullParser(Object beanObject)
beanObject
- public static Object deserialize(Class beanClass, org.apache.axiom.om.OMElement beanElement, ObjectSupplier objectSupplier, String arrayLocalName) throws AxisFault
AxisFault
public static Object deserialize(Class beanClass, org.apache.axiom.om.OMElement beanElement, MultirefHelper helper, ObjectSupplier objectSupplier) throws AxisFault
AxisFault
public static Object[] deserialize(org.apache.axiom.om.OMElement response, Object[] javaTypes, ObjectSupplier objectSupplier) throws AxisFault
response
- OMElementjavaTypes
- Array of JavaTypesAxisFault
public static Object[] deserialize(org.apache.axiom.om.OMElement response, Object[] javaTypes, ObjectSupplier objectSupplier, String[] parameterNames, Method method) throws AxisFault
AxisFault
public static Object processObject(org.apache.axiom.om.OMElement omElement, Class classType, MultirefHelper helper, boolean isArrayType, ObjectSupplier objectSupplier, Type generictype) throws AxisFault
AxisFault
public static Object processEnumObject(Class classType, org.apache.axiom.om.OMElement omElement) throws AxisFault
AxisFault
public static org.apache.axiom.om.OMElement getOMElement(QName opName, Object[] args, QName partName, boolean qualifed, TypeTable typeTable)
public static String getUniquePrifix()
public static String getUniquePrefix()
public static void addInstanceTypeAttribute(org.apache.axiom.om.OMFactory fac, org.apache.axiom.om.OMElement element, Object resObject, TypeTable typeTable)
fac
- the SOAPFactory instance.element
- the child OMElement to add attributes.resObject
- the java reflection methodresObject
- the res objecttypeTable
- the type table of particular Axis2 servicepublic static org.apache.axiom.om.OMDocument convertOMtoDOM(org.apache.axiom.om.OMContainer omElement)
omElement
- the OMelementpublic static org.apache.axiom.om.OMElement convertDOMtoOM(org.apache.axiom.om.OMFactory fac, Object document)
fac
- the facdocument
- the documentpublic static Map<Object,Object> processGenericsMapElement(Type[] parameterArgTypes, org.apache.axiom.om.OMElement omElement, MultirefHelper helper, Iterator parts, ObjectSupplier objectSupplier, Type genericType) throws AxisFault
parameterArgTypes
- the parameter argument types of Map omElement
- the OMElementhelper
- the helperparts
- the partsobjectSupplier
- the object suppliergenericType
- the generic typeAxisFault
- the axis faultpublic static List<org.apache.axiom.om.OMElement> getMapElement(org.apache.axiom.om.OMFactory fac, Type type, Map results, TypeTable typeTable, boolean elementFormDefault)
fac
- the OMFactorytype
- of the java.util.Mapresults
- the results valuestypeTable
- the type tableelementFormDefault
- the element form defaultpublic static Collection<Object> processGenericCollection(org.apache.axiom.om.OMElement omElement, Type generictype, MultirefHelper helper, ObjectSupplier objectSupplier) throws AxisFault
omElement
- the om elementgenerictype
- the generictypehelper
- the helperobjectSupplier
- the object supplierAxisFault
- the axis faultpublic static Collection<Object> processGenericCollection(org.apache.axiom.om.OMElement omElement, org.apache.axiom.om.OMElement[] toReturn, Type generictype, MultirefHelper helper, ObjectSupplier objectSupplier, Iterator parts, boolean bare) throws AxisFault
omElement
- the om elementtoReturn
- the to returngenerictype
- the generictypehelper
- the helperobjectSupplier
- the object supplierparts
- the partsbare
- the bareAxisFault
- the axis faultpublic static org.apache.axiom.om.OMElement getCollectionElement(org.apache.axiom.om.OMFactory fac, Type type, Collection results, String name, String innerName, QName elementQName, TypeTable typeTable, boolean elementFormDefault)
fac
- the factype
- the typeresults
- the resultsname
- the nameinnerName
- the inner nameelementQName
- the element q nametypeTable
- the type tableelementFormDefault
- the element form defaultCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.