@Override public List<MetaField> getFieldsWithMetaAnnotations(final Class<? extends Annotation> annotation) { final List<MetaField> methods = new ArrayList<>(); MetaClass scanTarget = this; while (scanTarget != null) { for (final MetaField m : scanTarget.getDeclaredFields()) { for (final Annotation a : m.getAnnotations()) { if (_findMetaAnnotation(a.annotationType(), annotation)) { methods.add(m); } } } scanTarget = scanTarget.getSuperClass(); } return methods; }
@Override public List<MetaField> getFieldsWithMetaAnnotations(final Class<? extends Annotation> annotation) { final List<MetaField> methods = new ArrayList<>(); MetaClass scanTarget = this; while (scanTarget != null) { for (final MetaField m : scanTarget.getDeclaredFields()) { for (final Annotation a : m.getAnnotations()) { if (_findMetaAnnotation(a.annotationType(), annotation)) { methods.add(m); } } } scanTarget = scanTarget.getSuperClass(); } return methods; }
/** * Returns a string which includes the declaring class's name and the field * type and field name, as well as all declared annotations for that field. * Do not rely on the format of this string remaining consistent across * releases of Errai. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(MetaField.class.getName()).append(":"); sb.append(getDeclaringClassName()).append("."); Annotation[] annos = getAnnotations(); if (annos != null) { for (Annotation anno : annos) { sb.append(anno.toString()).append(" "); } } sb.append(GenUtil.scopeOf(this).getCanonicalName()).append(" ") .append(GenUtil.modifiersOf(this).toJavaString()).append(" ") .append(this.getType()).append(" ").append(getName()); return sb.toString(); }
/** * Returns a string which includes the declaring class's name and the field * type and field name, as well as all declared annotations for that field. * Do not rely on the format of this string remaining consistent across * releases of Errai. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(MetaField.class.getName()).append(":"); sb.append(getDeclaringClassName()).append("."); Annotation[] annos = getAnnotations(); if (annos != null) { for (Annotation anno : annos) { sb.append(anno.toString()).append(" "); } } sb.append(GenUtil.scopeOf(this).getCanonicalName()).append(" ") .append(GenUtil.modifiersOf(this).toJavaString()).append(" ") .append(this.getType()).append(" ").append(getName()); return sb.toString(); }