/** * Checks is the given {@link MetaField} is in scope (part of the attached class contexts). * * @param field * the field to check. * * @return true if in scope, otherwise false. */ public boolean isInScope(final MetaField field) { checkThread(); Context c = this; do { for (final MetaClass clazz : c.classContexts) { for (final MetaField m : clazz.getDeclaredFields()) { if (m.equals(field)) return true; } } } while ((c = c.parent) != null); return false; }
/** * Checks is the given {@link MetaField} is in scope (part of the attached class contexts). * * @param field * the field to check. * * @return true if in scope, otherwise false. */ public boolean isInScope(final MetaField field) { checkThread(); Context c = this; do { for (final MetaClass clazz : c.classContexts) { for (final MetaField m : clazz.getDeclaredFields()) { if (m.equals(field)) return true; } } } while ((c = c.parent) != null); return false; }