com.flat502.rox.marshal
Class ArrayParameterTypeMapper

java.lang.Object
  extended by com.flat502.rox.marshal.UnmarshallerAid
      extended by com.flat502.rox.marshal.MethodCallUnmarshallerAid
          extended by com.flat502.rox.marshal.ArrayParameterTypeMapper

public class ArrayParameterTypeMapper
extends MethodCallUnmarshallerAid

An implementation of MethodCallUnmarshallerAid that maps a parameter index into a given array of Class instances.


Constructor Summary
ArrayParameterTypeMapper(java.lang.Class[] types)
          Initializes a new instance using the given array.
 
Method Summary
 FieldNameCodec getFieldNameCodec(java.lang.String methodName)
          Invoked when a method call unmarshaller is required.
 java.lang.Class getType(java.lang.String methodName, int index)
          Map the given parameter index into the underlying array of Class instances.
 
Methods inherited from class com.flat502.rox.marshal.UnmarshallerAid
ignoreMissingFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayParameterTypeMapper

public ArrayParameterTypeMapper(java.lang.Class[] types)
Initializes a new instance using the given array.

Parameters:
types - The array of Class instances to map parameters onto. May be null.
Method Detail

getType

public java.lang.Class getType(java.lang.String methodName,
                               int index)
Map the given parameter index into the underlying array of Class instances.

Specified by:
getType in class MethodCallUnmarshallerAid
Parameters:
methodName - The name of the XML-RPC method being invoked. This is ignored.
index - The index into the underlying array.
Returns:
The entry at index (which may be null) or null if either the backing array is null or the given index exceeds the size of the backing array.

getFieldNameCodec

public FieldNameCodec getFieldNameCodec(java.lang.String methodName)
Description copied from class: UnmarshallerAid
Invoked when a method call unmarshaller is required.

This method allows request handlers to override the default unmarshaller implementation for a given method (or class of methods) without imposing that unmarshaller on all request handlers.

Implementations may return the same instance for multiple calls to this method as long as the unmarshaller is thread-safe.

Implementations may return null in which case a default unmarshalling implementation will be used.

Overrides:
getFieldNameCodec in class UnmarshallerAid
Parameters:
methodName - The name of the XML-RPC method call being unmarshalled.
Returns:
always returns null.