ClassCastException While casting List<String> to Class<?>
问题 I have a method which has a list of inputs and each input value I have to cast it to required type. (Actually this list has values of parameters in "some" form which I am supposed to converted into required type, the required type is the type which method requires, this is for api invocation through reflection) I have written code like this: Type[] argTypes = method.getGenericParameterTypes(); List<Object> acutalValues = // List of actual values from method input. // Resultant list of