invocationJson.put(invocation.getMethodName());
JSONArray paramJson = new JSONArray();
for (int i = 0; i < invocation.getParameterTypes().length; ++i) {
- Class<?> parameterType = invocation.getParameterTypes()[i];
+ Type parameterType = invocation.getParameterTypes()[i];
Object referenceParameter = null;
// TODO Use default values for RPC parameter types
// if (!JsonCodec.isInternalType(parameterType)) {
import java.io.Serializable;
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
/**
* Internal class for keeping track of pending server to client method
private final String interfaceName;
private final String methodName;
private final Object[] parameters;
- private Class<?>[] parameterTypes;
+ private Type[] parameterTypes;
// used for sorting calls between different connectors in the same Root
private final long sequenceNumber;
this.connector = connector;
this.interfaceName = interfaceName;
methodName = method.getName();
- parameterTypes = method.getParameterTypes();
+ parameterTypes = method.getGenericParameterTypes();
this.parameters = (null != parameters) ? parameters : new Object[0];
sequenceNumber = ++counter;
}
- public Class<?>[] getParameterTypes() {
+ public Type[] getParameterTypes() {
return parameterTypes;
}