FileDocCategorySizeDatePackage
BeanSerializerFactory.javaAPI DocApache Axis 1.42869Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding.ser

BeanSerializerFactory

public class BeanSerializerFactory extends BaseSerializerFactory
SerializerFactory for Bean
author
Rich Scheuerle

Fields Summary
protected transient org.apache.axis.description.TypeDesc
typeDesc
protected transient org.apache.axis.utils.BeanPropertyDescriptor[]
propertyDescriptor
Constructors Summary
public BeanSerializerFactory(Class javaType, QName xmlType)


         
        super(BeanSerializer.class, xmlType, javaType);
        init(javaType);

    
Methods Summary
protected org.apache.axis.encoding.SerializergetGeneralPurpose(java.lang.String mechanismType)
Optimize construction of a BeanSerializer by caching the type and property descriptors.

        if (javaType == null || xmlType == null) {
           return super.getGeneralPurpose(mechanismType);
        }

        if (serClass == EnumSerializer.class) {
           return super.getGeneralPurpose(mechanismType);
        }

        return new BeanSerializer(javaType, xmlType, typeDesc, 
                                  propertyDescriptor);
    
public javax.xml.rpc.encoding.SerializergetSerializerAs(java.lang.String mechanismType)

        return (Serializer) super.getSerializerAs(mechanismType);
    
private voidinit(java.lang.Class javaType)

        // Sometimes an Enumeration class is registered as a Bean.
        // If this is the case, silently switch to the EnumSerializer
        if (JavaUtils.isEnumClass(javaType)) {
            serClass = EnumSerializer.class;
        }

        typeDesc = TypeDesc.getTypeDescForClass(javaType);

        if (typeDesc != null) {
            propertyDescriptor = typeDesc.getPropertyDescriptors();
        } else {
            propertyDescriptor = BeanUtils.getPd(javaType, null);
        }
    
private voidreadObject(java.io.ObjectInputStream in)

        in.defaultReadObject();
        init(javaType);