class ReflectionUtils {

    protected Field getDeclaredField(Object o, String fieldName) {
        Field declaredField = ReflectionUtil.getDeclaredField(o.getClass(), fieldName);
        if (declaredField != null) {
            return declaredField;
        }
        return ReflectionUtil.getDeclaredField(o.getClass().getSuperclass(), fieldName);
    }

}