code: public static Class<?> boxClass(final Class<?> c) {
      if (c.isPrimitive() && c != Class.class) {
        if (c == boolean.class) {
          return Boolean.class;
        } else if (c == byte.class) {
          return Byte.class;
        } else if (c == char.class) {
          return Character.class;
        } else if (c == short.class) {
          return Short.class;
        } else if (c == int.class) {
          return Integer.class;
        } else if (c == long.class) {
          return Long.class;
        } else if (c == float.class) {
          return Float.class;
        } else if (c == double.class) {
          return Double.class;
        } else if (c == void.class) {
          return Void.class;
        } else {
          throw new UnsupportedOperationException(
              "Encountered unknown primitive type!");
        }
      } else {
        return c;
      }
    }
docs: Given a primitive type, return its boxed representation.
  <p>
  Examples:
  <pre>{@code
  boxClass(int.class) -> Integer.class
  boxClass(String.class) -> String.class
  }</pre>
  @param c The class to be boxed.
  @return The boxed version of c, or c if it is not a primitive type.