public final class TypeUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static AegisType |
getReadType(XMLStreamReader xsr,
AegisContext context,
AegisType baseType) |
static AegisType |
getReadTypeStandalone(XMLStreamReader xsr,
AegisContext context,
AegisType baseType)
getReadType cannot just look up the xsi:type in the mapping.
|
static Type |
getSingleTypeParameter(Type type)
Insist that a Type is a parameterized type of one parameter.
|
static Type |
getSingleTypeParameter(Type type,
int index)
Insist that a Type is a parameterized type of one parameter.
|
static Class<?> |
getTypeClass(Type type,
boolean throwForNonClass)
Utility function to cast a Type to a Class.
|
static Class<?> |
getTypeRelatedClass(Type type)
If a Type is a class, return it as a class.
|
static AegisType |
getWriteType(AegisContext globalContext,
Object value,
AegisType type) |
static AegisType |
getWriteTypeStandalone(AegisContext globalContext,
Object value,
AegisType type) |
static AegisType |
getWriteTypeStandalone(AegisContext globalContext,
Object value,
Type reflectType)
Allow writing of collections when the type of the collection object is known via
an
Type object. |
static void |
setAttributeAttributes(QName name,
AegisType type,
org.apache.ws.commons.schema.XmlSchema root) |
public static final Logger LOG
public static AegisType getReadType(XMLStreamReader xsr, AegisContext context, AegisType baseType)
public static AegisType getReadTypeStandalone(XMLStreamReader xsr, AegisContext context, AegisType baseType)
xsr - context - public static AegisType getWriteType(AegisContext globalContext, Object value, AegisType type)
public static AegisType getWriteTypeStandalone(AegisContext globalContext, Object value, AegisType type)
public static AegisType getWriteTypeStandalone(AegisContext globalContext, Object value, Type reflectType)
Type object.globalContext - the contextvalue - the object to write.reflectType - the type to use in writing the object.public static void setAttributeAttributes(QName name, AegisType type, org.apache.ws.commons.schema.XmlSchema root)
public static Class<?> getTypeClass(Type type, boolean throwForNonClass)
type - Reflection type.throwForNonClass - whether to throw (true) or return null (false) if the Type
is not a class.public static Type getSingleTypeParameter(Type type)
type - the typepublic static Type getSingleTypeParameter(Type type, int index)
type - the typeindex - which parameterApache CXF