code: public static boolean isPrimitive(Type type) {
      // TODO(yanivi): support java.net.URI as primitive type?
      if (type instanceof WildcardType) {
        type = Types.getBound((WildcardType) type);
      }
      if (!(type instanceof Class<?>)) {
        return false;
      }
      Class<?> typeClass = (Class<?>) type;
      return typeClass.isPrimitive()
          || typeClass == Character.class
          || typeClass == String.class
          || typeClass == Integer.class
          || typeClass == Long.class
          || typeClass == Short.class
          || typeClass == Byte.class
          || typeClass == Float.class
          || typeClass == Double.class
          || typeClass == BigInteger.class
          || typeClass == BigDecimal.class
          || typeClass == DateTime.class
          || typeClass == Boolean.class;
    }
docs: Returns whether the given type is one of the supported primitive classes like number and
  date/time, or is a wildcard of one.
  
  <p>A primitive class is any class for whom {@link Class#isPrimitive()} is true, as well as any
  classes of type: {@link Character}, {@link String}, {@link Integer}, {@link Long}, {@link
  Short}, {@link Byte}, {@link Float}, {@link Double}, {@link BigInteger}, {@link BigDecimal},
  {@link Boolean}, and {@link DateTime}.
  
  @param type type or {@code null} for {@code false} result
  @return whether it is a primitive