List of utility methods to do Field Get
Object | getPrivateField(Object target, String fieldName) get Private Field Field field = target.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
return field.get(target);
|
Object | getPrivateField(Object target, String fieldName) get Private Field Field field = target.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
return field.get(target);
|
T | getPrivateField(Object target, String fieldName, Class get Private Field Field field = target.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
return (T) field.get(target);
|
List | getAllFields(List get All Fields Collections.addAll(fields, type.getDeclaredFields()); if (type.getSuperclass() != null) { fields = getAllFields(fields, type.getSuperclass()); return fields; |
Object | getSuperPrivateField(Object target, String fieldName) get Super Private Field Field field = target.getClass().getSuperclass()
.getDeclaredField(fieldName);
field.setAccessible(true);
return field.get(target);
|
Object | getAdditionalInstanceField(Object obj, String key) get Additional Instance Field if (obj == null) throw new NullPointerException("object must not be null"); if (key == null) throw new NullPointerException("key must not be null"); HashMap<String, Object> objectFields; synchronized (additionalFields) { objectFields = additionalFields.get(obj); if (objectFields == null) ... |
Object | getAdditionalStaticField(Object obj, String key) get Additional Static Field return getAdditionalInstanceField(obj.getClass(), key);
|
boolean | isBaseDateType(Field field) is Base Date Type Class<?> clazz = field.getType(); return clazz.equals(String.class) || clazz.equals(Integer.class) || clazz.equals(Byte.class) || clazz.equals(Long.class) || clazz.equals(Double.class) || clazz.equals(Float.class) || clazz.equals(Character.class) || clazz.equals(Short.class) || clazz.equals(Boolean.class) || clazz.equals(Date.class) || clazz.equals(java.util.Date.class) ... |