Java Utililty Methods Reflection Primitive

List of utility methods to do Reflection Primitive

Description

The list of methods to do Reflection Primitive are organized into topic(s).

Method

booleanisPrimitiveClass(Class cls)
is Primitive Class
return getWrapperClass(cls) != null;
booleanisPrimitiveClass(String className)
Determine whether the class of the specified className is a primitive type class
if (className != null && primitiveClassMap.containsKey(className)) {
    return true;
} else {
    return false;
booleanisPrimitiveClass(String primitiveClassName)
is Primitive Class
return primitiveStringToClass.containsKey(primitiveClassName);
booleanisPrimitiveClassName(String cls)
is Primitive Class Name
if (primitiveArrayMap.get(cls) != null) {
    return true;
String prims[] = { "boolean", "char", "byte", "short", "int", "long", "double", "float" };
for (String s : prims) {
    if (s.equals(cls)) {
        return true;
return false;
booleanisPrimitiveOrPrimitiveWrapper(final Class type)
is Primitive Or Primitive Wrapper
return type.isPrimitive() || primitives.containsValue(type);
booleanisPrimitiveOrWrapper(Class klass)
Determines if klass represents either a wrapper for a primitive type or a primitive type.
return klass.isPrimitive() || isPrimitiveWrapper(klass);
booleanisPrimitiveOrWrapper(Class type)
is Primitive Or Wrapper
return isPrimitive(type) || isWrapper(type);
booleanisPrimitiveOrWrapper(final Class type)
is Primitive Or Wrapper
if (type == null) {
    return false;
return type.isPrimitive() || isPrimitiveWrapper(type);
booleanisPrimitiveWrapper(Class clazz)
is Primitive Wrapper
return PRIMITIVES.containsKey(clazz);
booleanisPrimitiveWrapper(Class clazz)
Check if the given class represents a primitive wrapper, i.e.
if (clazz == null) {
    throw new IllegalArgumentException("Class must not be null");
return primitiveWrapperTypeMap.containsKey(clazz);