src/jdk/internal/dynalink/support/TypeUtilities.java

changeset 1090
99571b7922c0
parent 963
e2497b11a021
child 1183
6ed91931b5a7
equal deleted inserted replaced
1089:981feb6ad9cc 1090:99571b7922c0
518 * @return the class object representing the wrapper type, or null if the passed class is not a primitive. 518 * @return the class object representing the wrapper type, or null if the passed class is not a primitive.
519 */ 519 */
520 public static Class<?> getWrapperType(final Class<?> primitiveType) { 520 public static Class<?> getWrapperType(final Class<?> primitiveType) {
521 return WRAPPER_TYPES.get(primitiveType); 521 return WRAPPER_TYPES.get(primitiveType);
522 } 522 }
523
524 /**
525 * Returns true if the passed type is a wrapper for a primitive type.
526 * @param type the examined type
527 * @return true if the passed type is a wrapper for a primitive type.
528 */
529 public static boolean isWrapperType(final Class<?> type) {
530 return PRIMITIVE_TYPES.containsKey(type);
531 }
523 } 532 }

mercurial