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 } |