code: public static Class<?> wrappedType(Class<?> c) {
          int i;
  
          if (c.isPrimitive()) {
              for (i = 0; i < Type.PRIMITIVES.length; i++) {
                  if (Type.PRIMITIVES[i].type == c) {
                      return Type.PRIMITIVES[i].wrapper;
                  }
              }
              throw new RuntimeException();
          } else {
              return c;
          }
      }
docs: additional functionality for primitive Java Classes