code: public static <T> Class<T> primitiveTypeOf(Class<T> clazz) {
          if (clazz.isPrimitive()) {
              return clazz;
          }
          return (Class<T>) PRIMITIVE_TYPES.get(clazz);
      }
docs: Returns the primitive type of the given class.
  <p/>
  The passed class can be any class : <code>boolean.class</code>, <code>Integer.class</code>
  in witch case this method will return <code>boolean.class</code>, even <code>SomeObject.class</code>
  in which case <code>null</code> will be returned.
  
  @param clazz The class from which primitive type has to be retrieved
  @param <T>   The type
  @return The primitive type if relevant, otherwise <code>null</code>