private static Class < ? > box ( Class < ? > clazz ) { if ( clazz == int . class ) { return Integer . class ; } else if ( clazz == float . class ) { return Float . class ; } else if ( clazz == long . class ) { return Long . class ; } else if ( clazz == double . class ) { return double . class ; } else if ( clazz == boolean . class ) { return Boolean . class ; } else if ( clazz == char . class ) { return Character . class ; } else if ( clazz == byte . class ) { return Byte . class ; } return clazz ; }
returns the boxed type of the primitive class or the class itself if there is no wrapper for the given type .