KickJava   Java API By Example, From Geeks To Geeks.

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


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: MetaDataBeanDeserializerFactory.java,v 1.1.4.4 2005/04/12 16:07:43 starksm Exp $
10

11 import org.jboss.axis.encoding.Deserializer;
12 import org.jboss.axis.encoding.ser.BaseDeserializerFactory;
13 import org.jboss.webservice.deployment.BeanXMLMetaData;
14
15 import javax.xml.namespace.QName JavaDoc;
16
17 /** A factory for the MetaDataBeanDeserializer
18  *
19  * @author thomas.diesler@jboss.org
20  * @version $Revision: 1.1.4.4 $
21  */

22 public class MetaDataBeanDeserializerFactory extends BaseDeserializerFactory
23 {
24    /** @since 4.0.2 */
25    static final long serialVersionUID = -224671545135141383L;
26    
27    private BeanXMLMetaData metaData;
28
29    public MetaDataBeanDeserializerFactory(Class JavaDoc javaType, QName JavaDoc xmlType)
30    {
31       super(MetaDataBeanDeserializer.class, xmlType, javaType);
32    }
33
34    public void setMetaData(BeanXMLMetaData metaData)
35    {
36       this.metaData = metaData;
37    }
38
39    protected Deserializer getSpecialized(String JavaDoc mechanismType)
40    {
41       return newMetaDataBeanDeserializer();
42    }
43
44    protected Deserializer getGeneralPurpose(String JavaDoc mechanismType)
45    {
46       return newMetaDataBeanDeserializer();
47    }
48
49    private MetaDataBeanDeserializer newMetaDataBeanDeserializer()
50    {
51       return new MetaDataBeanDeserializer(javaType, xmlType, metaData);
52    }
53 }
54
Popular Tags