I have a method in my test framework that creates an instance of a class, depending on the parameters passed in:
public void test(Object... constructorArgs)
Use Integer.TYPE instead of Integer.class.
Integer.TYPE
Integer.class
As per the Javadocs, this is "The Class instance representing the primitive type int."
int
You can also use int.class. It's a shortcut for Integer.TYPE. Not only classes, even for primitive types you can say type.class in Java.
int.class
type.class