This is what I tried:
private boolean isBoxedPrimitive(Class<?> type) {
return type == Integer.class ||
type == Long.class ||
type == Short.class ||
type == Byte.class ||
type == Float.class ||
type == Double.class ||
type == Boolean.class ||
type == Character.class;
}
Is there a better way to write this in java, other than just enumerating 8 classes?