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

booleanisExtPrimitive(Class clazz)
Class.isPrimitive only works for the built-in Java types (eg.
return ucToLcTypeMap.containsKey(clazz);
booleanisNumber(Class type)
is Number
return typeMap.containsKey(type);
booleanisNumber(Class type)
is Number
return Number.class.isAssignableFrom(type)
        || type.isPrimitive() && Number.class.isAssignableFrom(primitiveWrappers.get(type));
booleanisNumber(Class clazz)
Indicate whether the clazz represents a number
return Number.class.isAssignableFrom(clazz) || Number.class.isAssignableFrom(boxedEquivalent(clazz));
booleanisNumeric(Class operandClass)
Determine whether the operand of type operandClass can be a numeric operand
if (operandClass == null || !operandClass.isPrimitive() || operandClass == boolean.class
        || operandClass == void.class) {
    if (primitiveLangClassMap.containsKey(operandClass)) {
        return true;
    return false;
return true;
...
booleanisNumericPrimitive(Class type)
Test whether a given type is a numeric primitive type.
return Arrays.asList(numericTypes).contains(type);
booleanisNumericType(Class aNumberClass)
Determines if the given class is numeric.
return NUMBER_RANK_MAP.get(aNumberClass) != null;
booleanisPrimitive(Class c)
is Primitive
return primitiveToWrapperMap.containsKey(c);
booleanisPrimitive(Class clazz)
is Primitive
return wrappers.containsKey(clazz);
booleanisPrimitiveClass(Class clazz)
Determines whether the given clazz is a primitive class.
return primitiveToObjectClassMap.containsKey(clazz);