Java Utililty Methods Class Type Check

List of utility methods to do Class Type Check

Description

The list of methods to do Class Type Check are organized into topic(s).

Method

booleanisJavaImmutable(Class cls)
Return if the specified Java class represents an immutable type.
return javaImmutables.get(cls.getName()) != null;
booleanisLogicalPrimitive(Class c)
is Logical Primitive
return c.isPrimitive() || prims.contains(c) || String.class.isAssignableFrom(c)
        || Number.class.isAssignableFrom(c) || Date.class.isAssignableFrom(c) || c.isEnum()
        || c.equals(Class.class);
booleanisMap(Class o)
is Map
return Map.class.isAssignableFrom(o);
booleanisMapType(final Class type)
Check if a type is a map type.
return Map.class.isAssignableFrom(type);
booleanisMethodReturnTypeValid(Class cls)
Check if method return type can be used for GridifySetToSet or GridifySetToValue annotations.
for (Class<?> mtdReturnType : ALLOWED_MTD_RETURN_TYPES) {
    if (mtdReturnType.equals(cls))
        return true;
return cls.isArray();
booleanisNumber(Class type)
is Number
if (type == null) {
    return false;
Class<?> forPrim = classForPrimitive(type);
if (forPrim != null) {
    type = forPrim;
return (Number.class.isAssignableFrom(type));
...
booleanisNumberType(Class type)
is Number Type
return (isIntegralNumberType(type) || isDecimalNumberType(type));
booleanisNumeralType(final Class c)
is Numeral Type
return NumeralTypes.contains(c);
booleanisPrimitive(Class c)
is Primitive
return c.isPrimitive() || prims.contains(c);
booleanisPrimitiveType(Class clazz)
is Primitive Type
if (clazz != null) {
    return clazz.isPrimitive() || clazz.isEnum() || Number.class.isAssignableFrom(clazz)
            || String.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz)
            || Character.class.isAssignableFrom(clazz) || Date.class.isAssignableFrom(clazz);
return false;