FileDocCategorySizeDatePackage
TypeMappingDelegate.javaAPI DocApache Axis 1.47337Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding

TypeMappingDelegate

public class TypeMappingDelegate extends Object implements TypeMapping
The TypeMapping delegate is used to simply delegate to the indicated type mapping. It is used by the TypeMappingRegistry to assist with chaining.
author
Rich Scheuerle (scheu@us.ibm.com)

Fields Summary
static final TypeMappingImpl
placeholder
TypeMappingImpl
delegate
TypeMappingDelegate
next
Constructors Summary
TypeMappingDelegate(TypeMappingImpl delegate)
Construct TypeMapping


           
      
        if (delegate == null) {
            throw new RuntimeException(Messages.getMessage("NullDelegate"));
        }
        this.delegate = delegate;
    
Methods Summary
public java.lang.Class[]getAllClasses()
Returns an array of all the classes contained within this mapping

        return delegate.getAllClasses(next);
    
public java.lang.ClassgetClassForQName(javax.xml.namespace.QName xmlType)
Gets the Class mapped to QName.

param
xmlType qname or null
return
javaType class for type or null for no mappingor delegate

        return getClassForQName(xmlType, null);
    
public java.lang.ClassgetClassForQName(javax.xml.namespace.QName xmlType, java.lang.Class javaType)
Gets the Class mapped to QName, preferring the passed Class if possible

param
xmlType qname or null
param
javaType a Java class
return
javaType class for type or null for no mappingor delegate

        return delegate.getClassForQName(xmlType, javaType, next);
    
public javax.xml.rpc.encoding.DeserializerFactorygetDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType)

        return getDeserializer(javaType, xmlType, this);
    
public javax.xml.rpc.encoding.DeserializerFactorygetDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType, org.apache.axis.encoding.TypeMappingDelegate start)

        javax.xml.rpc.encoding.DeserializerFactory df =
                delegate.getDeserializer(javaType, xmlType, start);
        if (df == null && next != null) {
            df = next.getDeserializer(javaType, xmlType, start);
        }
        if (df == null) {
            df = delegate.finalGetDeserializer(javaType, xmlType, start);
        }
        return df;
    
public javax.xml.rpc.encoding.DeserializerFactorygetDeserializer(javax.xml.namespace.QName xmlType)

        return getDeserializer(null, xmlType);
    
public org.apache.axis.encoding.TypeMappingDelegategetNext()
getDelegate gets the new Delegate TypeMapping

        return next;
    
public javax.xml.rpc.encoding.SerializerFactorygetSerializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType)

        javax.xml.rpc.encoding.SerializerFactory sf = delegate.getSerializer(javaType, xmlType);

        if (sf == null && next != null) {
            sf = next.getSerializer(javaType, xmlType);
        }

        if (sf == null) {
            sf = delegate.finalGetSerializer(javaType);
        }

        return sf;
    
public javax.xml.rpc.encoding.SerializerFactorygetSerializer(java.lang.Class javaType)

        return getSerializer(javaType, null);
    
public java.lang.String[]getSupportedEncodings()
JAX-RPC Compliant Method Definitions

        return delegate.getSupportedEncodings();
    
public javax.xml.namespace.QNamegetTypeQName(java.lang.Class javaType)
Gets the QName for the type mapped to Class.

param
javaType class or type
return
xmlType qname or null

        return delegate.getTypeQName(javaType, next);
    
public javax.xml.namespace.QNamegetTypeQNameExact(java.lang.Class javaType)
Get the QName for this Java class, but only return a specific mapping if there is one. In other words, don't do special array processing, etc.

param
javaType
return

        QName result = delegate.getTypeQNameExact(javaType, next);

        return result;
    
public javax.xml.namespace.QNamegetXMLType(java.lang.Class javaType, javax.xml.namespace.QName xmlType, boolean encoded)
Get the exact XML type QName which will be used when serializing a given Class to a given type QName. In other words, if we have: Class TypeQName ---------------------- Base myNS:Base Child myNS:Child and call getXMLType(Child.class, BASE_QNAME), we should get CHILD_QNAME.

param
javaType
param
xmlType
return
the type's QName
throws
JAXRPCException

        QName result = delegate.getXMLType(javaType, xmlType, encoded);
        if (result == null && next != null) {
            return next.getXMLType(javaType, xmlType, encoded);
        }
        return result;
    
public booleanisRegistered(java.lang.Class javaType, javax.xml.namespace.QName xmlType)

       boolean result = delegate.isRegistered(javaType, xmlType);
       if (result == false && next != null) {
           return next.isRegistered(javaType, xmlType);
       }
       return result;
   
public voidregister(java.lang.Class javaType, javax.xml.namespace.QName xmlType, javax.xml.rpc.encoding.SerializerFactory sf, javax.xml.rpc.encoding.DeserializerFactory dsf)
always throws an exception

param
javaType
param
xmlType
param
sf
param
dsf
throws
JAXRPCException

        delegate.register(javaType, xmlType, sf, dsf);
    
public voidremoveDeserializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType)

        delegate.removeDeserializer(javaType, xmlType);
    
public voidremoveSerializer(java.lang.Class javaType, javax.xml.namespace.QName xmlType)

        delegate.removeSerializer(javaType, xmlType);
    
public voidsetDoAutoTypes(boolean doAutoTypes)

        delegate.setDoAutoTypes(doAutoTypes);
    
public voidsetNext(org.apache.axis.encoding.TypeMappingDelegate next)
setDelegate sets the new Delegate TypeMapping

        if (next == this) {
            return; // Refuse to set up tight loops (throw exception?)
        }
        this.next = next;
    
public voidsetSupportedEncodings(java.lang.String[] namespaceURIs)

        delegate.setSupportedEncodings(namespaceURIs);