public static Type getType ( final Class c ) { if ( c . isPrimitive ( ) ) { if ( c == Integer . TYPE ) { return INT_TYPE ; } else if ( c == Void . TYPE ) { return VOID_TYPE ; } else if ( c == Boolean . TYPE ) { return BOOLEAN_TYPE ; } else if ( c == Byte . TYPE ) { return BYTE_TYPE ; } else if ( c == Character . TYPE ) { return CHAR_TYPE ; } else if ( c == Short . TYPE ) { return SHORT_TYPE ; } else if ( c == Double . TYPE ) { return DOUBLE_TYPE ; } else if ( c == Float . TYPE ) { return FLOAT_TYPE ; } else /* if (c == Long.TYPE) */ { return LONG_TYPE ; } } else { return getType ( getDescriptor ( c ) ) ; } }
Returns the Java type corresponding to the given class .