code: private static Class primitiveToWrapperType(Class clazz) {
  	// boolean, byte, char, short, int, long, float, and double
  	if (clazz == null) return null;
  	else if (clazz.isPrimitive()) {
  	    if (clazz.getName().equals("boolean")) return Boolean.class;
  	    else if (clazz.getName().equals("byte")) return Byte.class;
  	    else if (clazz.getName().equals("char")) return Character.class;
  	    else if (clazz.getName().equals("short")) return Short.class;
  	    else if (clazz.getName().equals("int")) return Integer.class;
  	    else if (clazz.getName().equals("long")) return Long.class;
  	    else if (clazz.getName().equals("float")) return Float.class;
  	    else if (clazz.getName().equals("double")) return Double.class;
  	}
  	return clazz;
      }
docs: cast a primitive type class definition to his object reference type
  
  @param clazz class object to check and convert if it is of primitive type
  @return object reference class object