Here you can find the source of convertWrapperToPrimitive(Class> clazz)
public static Class<?> convertWrapperToPrimitive(Class<?> clazz)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { private static final Map<String, Class<?>> wrapperPrimitiveClasses = new HashMap<String, Class<?>>(); public static Class<?> convertWrapperToPrimitive(Class<?> clazz) { Class<?> result = clazz; if (!clazz.isPrimitive()) { return wrapperPrimitiveClasses.get(clazz.getName()); }/*w w w. ja va 2s.c o m*/ return result; } }