app/src/main/java/db/juhaku/juhakudb/util/ReflectionUtils.java
/**
     * Method looks for specific {@link Field} from given clazz all the way up to the {@link Object} class.
     *
     * @param clazz Class<?> whose field is looked for.
     * @param name String name of the field to look for.
     * @return found {@link Field} otherwise null.
     *
     * @since 1.0.2
     */
Method looks for specific  Field from given clazz all the way up to the  Object class.
@param clazz Class whose field is looked for.
@param name String name of the field to look for.
@return found  Field otherwise null.


Method looks for specific Field from given clazz all the way up to the Object class . @param clazz Class whose field is looked for . @param name String name of the field to look for . @return found Field otherwise null .
public static Field findField(Class<?> clazz, String name) {
        while (!clazz.isAssignableFrom(Object.class)) {
            for (Field field : clazz.getDeclaredFields()) {
                field.setAccessible(true);
                if (field.getName().equals(name)) {
                    return field;
                }
            }
            clazz = clazz.getSuperclass();
        }
        return null;
    }
public static Field findField ( Class < ? > clazz , String name ) { while ( ! clazz . isAssignableFrom ( Object . class ) ) { for ( Field field : clazz . getDeclaredFields ( ) ) { field . setAccessible ( true ) ; if ( field . getName ( ) . equals ( name ) ) { return field ; } } clazz = clazz . getSuperclass ( ) ; } return null ; }
Method looks for specific {@link Field} from given clazz all the way up to the {@link Object} class.
Method looks for specific { @link Field } from given clazz all the way up to the { @link Object } class .