List of utility methods to do Reflection Field Check
boolean | addFieldClass(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; |
List | getAllFieldsNoCache(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; |
String | getFieldAttribute(Class> entityClass, String fieldName) get Field Attribute return fieldAttributes.get(entityClass.getName() + "#" + fieldName); |
List | getFields(Class klass) get Fields List fields = new ArrayList(); while (!klass.equals(Object.class)) { fields.addAll(Arrays.asList(klass.getDeclaredFields())); klass = klass.getSuperclass(); return fields; |
int | getFieldSize(Class clazz) get Field Size Integer i = (Integer) primitiveSizes.get(clazz);
return i != null ? i.intValue() : getPointerSize();
|
boolean | isFieldAutoBindable(Class> clazz) is Field Auto Bindable return isAnywayAutoBindable(clazz);
|
boolean | isJavaClass(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")) { ... |
void | putCachedSerializerForClass(Class> instanceType, Class> customFieldSerializer) put Cached Serializer For Class synchronized (classCustomSerializerCache) {
classCustomSerializerCache.put(instanceType, customFieldSerializer);
|