Here you can find the source of toPrimitiveClass(Class> wrapperClass)
public static Class<?> toPrimitiveClass(Class<?> wrapperClass)
//package com.java2s; //License from project: Apache License public class Main { public static Class<?> toPrimitiveClass(Class<?> wrapperClass) { if (wrapperClass == Integer.class) { return Integer.TYPE; } else if (wrapperClass == Byte.class) { return Byte.TYPE; } else if (wrapperClass == Short.class) { return Short.TYPE; } else if (wrapperClass == Long.class) { return Long.TYPE; } else if (wrapperClass == Float.class) { return Float.TYPE; } else if (wrapperClass == Double.class) { return Double.TYPE; } else if (wrapperClass == Character.class) { return Character.TYPE; } else if (wrapperClass == Boolean.class) { return Boolean.TYPE; } else {//from w w w . j ava 2 s. c o m return wrapperClass; } } }