List of utility methods to do Class Type Check
boolean | isJavaImmutable(Class cls) Return if the specified Java class represents an immutable type. return javaImmutables.get(cls.getName()) != null;
|
boolean | isLogicalPrimitive(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); |
boolean | isMap(Class> o) is Map return Map.class.isAssignableFrom(o); |
boolean | isMapType(final Class> type) Check if a type is a map type. return Map.class.isAssignableFrom(type); |
boolean | isMethodReturnTypeValid(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(); |
boolean | isNumber(Class> type) is Number if (type == null) { return false; Class<?> forPrim = classForPrimitive(type); if (forPrim != null) { type = forPrim; return (Number.class.isAssignableFrom(type)); ... |
boolean | isNumberType(Class> type) is Number Type return (isIntegralNumberType(type) || isDecimalNumberType(type));
|
boolean | isNumeralType(final Class> c) is Numeral Type return NumeralTypes.contains(c);
|
boolean | isPrimitive(Class c) is Primitive return c.isPrimitive() || prims.contains(c);
|
boolean | isPrimitiveType(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; |