Field (final Class<?> aClass, final BooleanFunction<? super Field> cond) { final Field[] res = new Field[]{null}; forEachField(aClass, new BooleanFunction<Field>() { @Override public boolean fun(Field field) { if (!cond.fun(field)) { return true; // continue } res[0] = field; return false; // stop } }); return res[0]; }