code: public Class<?> getWrapperType(Class<?> primitiveType) {
          for(PrimitiveEnum p : PrimitiveEnum.values()) {
              if(p.getType().equals(primitiveType)) {
                  return p.getClazz();
              }
          }
  
          return primitiveType; // if not primitive, return it as is
      }
docs: Get wrapper type of a primitive type.
  
  @param primitiveType to get its wrapper type
  @return the wrapper type of the given primitive type