|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.aegis.type.AegisType org.apache.cxf.aegis.type.basic.BeanType
public class BeanType
Serializes JavaBeans. There's a really dangerous coding convention in this class, maintainers beware. There are two constructor. The no-args constructor defers, until later, the construction of a BeanTypeInfo. The one-arg constructor gets the BeanTypeInfo passed as a parameter. Aegis doesn't have any uniform discipline of 'construct, set properties, initialize'. Instead, each piece of code that uses the type info needs to call getTypeInfo() instead of referencing the 'info' field.
Field Summary |
---|
Fields inherited from class org.apache.cxf.aegis.type.AegisType |
---|
typeClass |
Constructor Summary | |
---|---|
BeanType()
Construct a type info. |
|
BeanType(BeanTypeInfo info)
Construct a type info given a full BeanTypeInfo. |
Method Summary | |
---|---|
protected boolean |
alwaysAllowNillables()
|
protected Object |
createFromFault(Context context)
If the class is an exception, this will try and instantiate it with information from the XFireFault (if it exists). |
BeanTypeInfo |
createTypeInfo()
Create type info based in the type class. |
protected BeanTypeInfo |
getBeanTypeInfoWithProperty(QName name)
|
Set<AegisType> |
getDependencies()
Return a set of AegisType dependencies. |
protected AegisType |
getElementType(QName name,
BeanTypeInfo beanTypeInfo,
MessageReader reader,
Context context)
|
long |
getMinOccurs()
|
AegisType |
getSuperType()
Return the AegisType for the superclass if this type's class, if any. |
BeanTypeInfo |
getTypeInfo()
Return the type info. |
boolean |
hasMinOccurs()
|
boolean |
isComplex()
We need to write a complex type schema for Beans, so return true. |
Object |
readObject(MessageReader reader,
Context context)
Read in the XML fragment and create an object. |
protected Object |
readProperty(Object object,
QName name)
|
void |
setTypeClass(Type typeClass)
|
void |
setTypeMapping(TypeMapping typeMapping)
|
String |
toString()
|
protected void |
writeElement(QName name,
Object value,
AegisType type,
MessageWriter writer,
Context context)
|
void |
writeObject(Object object,
MessageWriter writer,
Context context)
Writes the object to the MessageWriter. |
protected void |
writeProperty(QName name,
Object object,
Object property,
Class<?> impl,
BeanTypeInfo inf)
Write the specified property to a field. |
void |
writeSchema(org.apache.ws.commons.schema.XmlSchema root)
If this type should correspond to a global, named, schema type, here is where the type object adds it to the schema. |
Methods inherited from class org.apache.cxf.aegis.type.AegisType |
---|
addToSchemaElement, equals, getMaxOccurs, getSchemaType, getType, getTypeClass, getTypeMapping, hashCode, hasMaxOccurs, isAbstract, isFlatArray, isNillable, isWriteOuter, setAbstract, setFlatArray, setNillable, setSchemaType, setWriteOuter, usesUtilityTypes, usesXmime |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanType()
public BeanType(BeanTypeInfo info)
info
- Method Detail |
---|
public Object readObject(MessageReader reader, Context context) throws DatabindingException
readObject
in class AegisType
DatabindingException
protected boolean alwaysAllowNillables()
protected AegisType getElementType(QName name, BeanTypeInfo beanTypeInfo, MessageReader reader, Context context)
protected Object createFromFault(Context context) throws SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
SecurityException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
protected void writeProperty(QName name, Object object, Object property, Class<?> impl, BeanTypeInfo inf) throws DatabindingException
DatabindingException
public void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException
writeObject
in class AegisType
DatabindingException
protected void writeElement(QName name, Object value, AegisType type, MessageWriter writer, Context context)
protected Object readProperty(Object object, QName name)
public void setTypeClass(Type typeClass)
setTypeClass
in class AegisType
typeClass
- The typeClass to set.public boolean isComplex()
isComplex
in class AegisType
AegisType.isComplex()
public Set<AegisType> getDependencies()
getDependencies
in class AegisType
AegisType
dependenciesprotected BeanTypeInfo getBeanTypeInfoWithProperty(QName name)
public AegisType getSuperType()
public BeanTypeInfo getTypeInfo()
public BeanTypeInfo createTypeInfo()
public String toString()
toString
in class AegisType
public long getMinOccurs()
getMinOccurs
in class AegisType
public boolean hasMinOccurs()
hasMinOccurs
in class AegisType
public void setTypeMapping(TypeMapping typeMapping)
setTypeMapping
in class AegisType
typeMapping
- The typeMapping to set.public void writeSchema(org.apache.ws.commons.schema.XmlSchema root)
AegisType
writeSchema
in class AegisType
root
- root of the XSD document.
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |