FileDocCategorySizeDatePackage
CastorEnumTypeDeserializer.javaAPI DocApache Axis 1.42013Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding.ser.castor

CastorEnumTypeDeserializer

public class CastorEnumTypeDeserializer extends org.apache.axis.encoding.DeserializerImpl implements org.apache.axis.encoding.Deserializer
Castor deserializer
author
Ozzie Gurkan
version
1.0

Fields Summary
public QName
xmlType
public Class
javaType
Constructors Summary
public CastorEnumTypeDeserializer(Class javaType, QName xmlType)

        this.xmlType = xmlType;
        this.javaType = javaType;
    
Methods Summary
public voidonEndElement(java.lang.String namespace, java.lang.String localName, org.apache.axis.encoding.DeserializationContext context)


        try {
            MessageElement msgElem = context.getCurElement();
            if (msgElem != null) {
                Method method = javaType.getMethod("valueOf", new Class[]{String.class});
                value = method.invoke(null, new Object[]{msgElem.getValue()});
            }
        } catch (Exception exp) {
            log.error(Messages.getMessage("exception00"), exp);
            throw new SAXException(exp);
        }