Package org.apache.cxf.aegis.type.basic
Class ObjectType
- java.lang.Object
-
- org.apache.cxf.aegis.type.AegisType
-
- org.apache.cxf.aegis.type.basic.ObjectType
-
public class ObjectType extends AegisType
AegisType for runtime inspection of types. Looks as the class to be written, and looks to see if there is a type for that class. If there is, it writes out the value and inserts a xsi:type attribute to signal what the type of the value is. Can specify an optional set of dependentAegisType's in the constructor, in the case that the type is a custom type that may not have its schema in the WSDL. Can specify whether or not unknown objects should be serialized as a byte stream.
-
-
Constructor Summary
Constructors Constructor Description ObjectType()ObjectType(Set<AegisType> dependencies)ObjectType(Set<AegisType> dependencies, boolean serializeWhenUnknown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AegisTypedetermineType(Context context, Class<?> clazz)Set<AegisType>getDependencies()Return a set of AegisType dependencies.booleanisComplex()booleanisReadToDocument()ObjectreadObject(MessageReader reader, Context context)Read in the XML fragment and create an object.voidsetDependencies(Set<AegisType> dependencies)voidsetReadToDocument(boolean readToDocument)voidwriteObject(Object object, MessageWriter writer, Context context)Writes the object to the MessageWriter.-
Methods inherited from class org.apache.cxf.aegis.type.AegisType
addToSchemaElement, equals, getMaxOccurs, getMinOccurs, getSchemaType, getType, getTypeClass, getTypeMapping, hashCode, hasMaxOccurs, hasMinOccurs, isAbstract, isFlatArray, isNillable, isWriteOuter, setAbstract, setFlatArray, setNillable, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, usesUtilityTypes, usesXmime, writeSchema
-
-
-
-
Method Detail
-
readObject
public Object readObject(MessageReader reader, Context context) throws DatabindingException
Description copied from class:AegisTypeRead in the XML fragment and create an object.- Specified by:
readObjectin classAegisType- Returns:
- Throws:
DatabindingException
-
writeObject
public void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException
Description copied from class:AegisTypeWrites the object to the MessageWriter.- Specified by:
writeObjectin classAegisType- Throws:
DatabindingException
-
isReadToDocument
public boolean isReadToDocument()
-
setReadToDocument
public void setReadToDocument(boolean readToDocument)
-
getDependencies
public Set<AegisType> getDependencies()
Description copied from class:AegisTypeReturn a set of AegisType dependencies. Returns null if this type has no dependencies.- Overrides:
getDependenciesin classAegisType- Returns:
- Set of
AegisTypedependencies
-
-