public static List<Class<?>> convertArgumentClassesToPrimitives( Class<?>... arguments ) {
        if (arguments == null || arguments.length == 0) return Collections.emptyList();
        List<Class<?>> result = new ArrayList<Class<?>>(arguments.length);
        for (Class<?> clazz : arguments) {
            if (clazz == Boolean.class) clazz = Boolean.TYPE;
            else if (clazz == Character.class) clazz = Character.TYPE;
            else if (clazz == Byte.class) clazz = Byte.TYPE;
            else if (clazz == Short.class) clazz = Short.TYPE;
            else if (clazz == Integer.class) clazz = Integer.TYPE;
            else if (clazz == Long.class) clazz = Long.TYPE;
            else if (clazz == Float.class) clazz = Float.TYPE;
            else if (clazz == Double.class) clazz = Double.TYPE;
            else if (clazz == Void.class) clazz = Void.TYPE;
            result.add(clazz);
        }

        return result;
    }
public static List < Class < ? > > convertArgumentClassesToPrimitives ( Class < ? > ... arguments ) { if ( arguments == null || arguments . length == 0 ) return Collections . emptyList ( ) ; List < Class < ? > > result = new ArrayList < Class < ? > > ( arguments . length ) ; for ( Class < ? > clazz : arguments ) { if ( clazz == Boolean . class ) clazz = Boolean . TYPE ; else if ( clazz == Character . class ) clazz = Character . TYPE ; else if ( clazz == Byte . class ) clazz = Byte . TYPE ; else if ( clazz == Short . class ) clazz = Short . TYPE ; else if ( clazz == Integer . class ) clazz = Integer . TYPE ; else if ( clazz == Long . class ) clazz = Long . TYPE ; else if ( clazz == Float . class ) clazz = Float . TYPE ; else if ( clazz == Double . class ) clazz = Double . TYPE ; else if ( clazz == Void . class ) clazz = Void . TYPE ; result . add ( clazz ) ; } return result ; }
Convert any argument classes to primitives.

@param arguments the list of argument classes.
@return the list of Class instances in which any classes that could be represented by primitives (e.g., Boolean) were
replaced with the primitive classes (e.g., Boolean.TYPE).