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 ; }
cast a primitive type class definition to his object reference type