This is my code and it works:
Value[] params2 = {val};
Class<?> clazz = Class.forName("package." + className);
Method[] thisMethod = clazz.getMethods();
thisMethod[0].invoke(clazz.newInstance(), new Object[]{params2});
However when I try to send list of 'val' objects as a parameter,
List<Value>[] params2 = {valList};
I get:
'Cannot create a generic array of List error'
How can I pass list of val objects as a paramter?