1 16 17 package org.apache.axis.encoding.ser; 18 19 import org.apache.axis.Constants; 20 import org.apache.axis.encoding.Serializer; 21 22 import javax.xml.namespace.QName ; 23 24 25 30 public class ArraySerializerFactory extends BaseSerializerFactory { 31 public ArraySerializerFactory() { 32 this(Object [].class, Constants.SOAP_ARRAY); 33 } 34 public ArraySerializerFactory(Class javaType, QName xmlType) { 35 super(ArraySerializer.class, xmlType, javaType); 36 } 37 38 private QName componentType = null; 39 private QName componentQName = null; 40 41 public ArraySerializerFactory(QName componentType) { 42 super(ArraySerializer.class, Constants.SOAP_ARRAY, Object [].class); 43 this.componentType = componentType; 44 } 45 46 public ArraySerializerFactory(QName componentType, QName componentQName) { 47 this(componentType); 48 this.componentQName = componentQName; 49 } 50 51 54 public void setComponentQName(QName componentQName) { 55 this.componentQName = componentQName; 56 } 57 58 61 public void setComponentType(QName componentType) { 62 this.componentType = componentType; 63 } 64 65 68 public QName getComponentQName() { 69 return componentQName; 70 } 71 74 public QName getComponentType() { 75 return componentType; 76 } 77 81 protected Serializer getGeneralPurpose(String mechanismType) 82 { 83 85 if (componentType == null) 86 return super.getGeneralPurpose(mechanismType); 87 else 88 return new ArraySerializer(javaType, xmlType, componentType, componentQName); 89 } 90 } 91 | Popular Tags |