Here you can find the source of primitiveToWrapper(final Class> cls)
public static Class<?> primitiveToWrapper(final Class<?> cls)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { private static final Map<Class<?>, Class<?>> primitiveWrapperMap = new HashMap<Class<?>, Class<?>>(); public static Class<?> primitiveToWrapper(final Class<?> cls) { Class<?> convertedClass = cls; if (cls != null && cls.isPrimitive()) { convertedClass = primitiveWrapperMap.get(cls); }// w w w .java 2 s. c om return convertedClass; } }