KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > webservice > encoding > ser > MetaDataBeanSerializerFactory


1 /**
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.webservice.encoding.ser;
8
9 // $Id: MetaDataBeanSerializerFactory.java,v 1.2.4.4 2005/04/12 16:07:44 starksm Exp $
10

11 import org.jboss.axis.encoding.Serializer;
12 import org.jboss.axis.encoding.ser.BaseSerializerFactory;
13 import org.jboss.webservice.deployment.BeanXMLMetaData;
14
15 import javax.xml.namespace.QName JavaDoc;
16
17 /** A factory for the MetaDataBeanSerializer
18  *
19  * @author thomas.diesler@jboss.org
20  */

21 public class MetaDataBeanSerializerFactory extends BaseSerializerFactory
22 {
23    /** @since 4.0.2 */
24    static final long serialVersionUID = 2678054736500907260L;
25
26    private BeanXMLMetaData metaData;
27
28    public MetaDataBeanSerializerFactory(Class JavaDoc javaType, QName JavaDoc xmlType)
29    {
30       super(MetaDataBeanSerializer.class, xmlType, javaType);
31    }
32
33    public void setMetaData(BeanXMLMetaData metaData)
34    {
35       this.metaData = metaData;
36    }
37
38    protected Serializer getSpecialized(String JavaDoc mechanismType)
39    {
40       return new MetaDataBeanSerializer(javaType, xmlType, metaData);
41    }
42
43    protected Serializer getGeneralPurpose(String JavaDoc mechanismType)
44    {
45       return new MetaDataBeanSerializer(javaType, xmlType, metaData);
46    }
47 }
48
Popular Tags