Java Utililty Methods Reflection Field Check

List of utility methods to do Reflection Field Check

Description

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

Method

booleanaddFieldClass(String fieldName, Class clazz)
add Field Class
if (fieldTypeMap.containsKey(fieldName) && fieldTypeMap.get(fieldName) != clazz) {
    System.out.println("Field type inconsistancy '" + fieldName + "' with types : "
            + fieldTypeMap.get(fieldName) + " and " + clazz);
    return false;
fieldTypeMap.put(fieldName, clazz);
return true;
ListgetAllFieldsNoCache(Class realClass, Class upperClass)
get All Fields No Cache
if (realClass == upperClass) {
    return new ArrayList(0);
List fields = getAllFieldsNoCache(realClass.getSuperclass(), upperClass);
fields.addAll(Arrays.asList(realClass.getDeclaredFields()));
return fields;
StringgetFieldAttribute(Class entityClass, String fieldName)
get Field Attribute
return fieldAttributes.get(entityClass.getName() + "#" + fieldName);
ListgetFields(Class klass)
get Fields
List fields = new ArrayList();
while (!klass.equals(Object.class)) {
    fields.addAll(Arrays.asList(klass.getDeclaredFields()));
    klass = klass.getSuperclass();
return fields;
intgetFieldSize(Class clazz)
get Field Size
Integer i = (Integer) primitiveSizes.get(clazz);
return i != null ? i.intValue() : getPointerSize();
booleanisFieldAutoBindable(Class clazz)
is Field Auto Bindable
return isAnywayAutoBindable(clazz); 
booleanisJavaClass(Field field)
is Java Class
Class<?> fieldType = field.getType();
boolean isBaseClass = false;
if (fieldType.isArray()) {
    isBaseClass = false;
} else if (fieldType.isPrimitive() || fieldType.getPackage() == null
        || fieldType.getPackage().getName().equals("java.lang")
        || fieldType.getPackage().getName().equals("java.math")
        || fieldType.getPackage().getName().equals("java.util")) {
...
voidputCachedSerializerForClass(Class instanceType, Class customFieldSerializer)
put Cached Serializer For Class
synchronized (classCustomSerializerCache) {
    classCustomSerializerCache.put(instanceType, customFieldSerializer);