public static Class getPrimitiveObjectClass ( Class pClass ) { if ( pClass == Boolean . TYPE ) { return Boolean . class ; } else if ( pClass == Byte . TYPE ) { return Byte . class ; } else if ( pClass == Short . TYPE ) { return Short . class ; } else if ( pClass == Character . TYPE ) { return Character . class ; } else if ( pClass == Integer . TYPE ) { return Integer . class ; } else if ( pClass == Long . TYPE ) { return Long . class ; } else if ( pClass == Float . TYPE ) { return Float . class ; } else if ( pClass == Double . TYPE ) { return Double . class ; } else { return pClass ; } }
If the given class is a primitive class returns the object version of that class . Otherwise the class is just returned .