List of utility methods to do Class Type Check
boolean | isPrimitiveType(String className) is Primitive Type return primitiveTypeMap.containsKey(className);
|
boolean | isPrimitiveWrapper(Class> clazz) is Primitive Wrapper return primitiveWrapperTypes.contains(clazz);
|
boolean | isPrimitiveWrapper(Class> type) Returns whether the given type is a primitive wrapper ( Boolean , Byte , Character , Short , Integer , Long , Double , Float ). return wrapperPrimitiveMap.containsKey(type);
|
boolean | isSimpleClass(Class> clazz) is Simple Class return clazz.isPrimitive() || clazz.isEnum() || String.class.isAssignableFrom(clazz) || Number.class.isAssignableFrom(clazz) || String.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz) || Date.class.isAssignableFrom(clazz) || Calendar.class.isAssignableFrom(clazz) || UUID.class.isAssignableFrom(clazz); |
boolean | isSimpleType(Class clazz) is Simple Type return clazz.isPrimitive() || clazz.isEnum() || SIMPLE_TYPES.contains(clazz);
|
boolean | isSupportedParameter(Class type) is Supported Parameter if (supportedParamTypes.contains(type)) { return true; return false; |
boolean | isTerminal(Class clazz) is Terminal return clazz == Object.class || Iterable.class.isAssignableFrom(clazz) || clazz.isArray() || Map.class.isAssignableFrom(clazz); |
boolean | isTypeConvertible(Class srcType, Class destType) is Type Convertible if (srcType == null) return (Object.class.isAssignableFrom(destType)); if (destType.isAssignableFrom(srcType)) return true; if ((srcType == Boolean.TYPE || srcType == Boolean.class) && (destType == Boolean.TYPE || destType == Boolean.class)) return true; int i = _numericPrimitiveClasses.indexOf(srcType); ... |
boolean | isUniformCollection(Collection> c, Class> e) Check if the given collection is a uniform collection of the given type. if (e == null) { throw new IllegalArgumentException("Null reference type"); if (c == null) { throw new IllegalArgumentException("Null collection"); if (c.isEmpty()) { return false; ... |
boolean | isWrapperOfPrimitiveType(Class> primitiveType, Class> otherType) is Wrapper Of Primitive Type return primitiveType == WRAPPER_TO_PRIMITIVE.get(otherType);
|