@Test public void shouldReturnCorrectElementList() throws Exception { AnnotatedElement money = getDeclaredField(Sample.class, FIELD_NAME, true); List<AnnotatedElement> actual = new ArrayList<>(); actual.addAll(processor.getElementsToProcess()); assertEquals(Sample.UI_DISPLAYABLE_FIELD_COUNT, actual.size()); assertThat(actual, hasItem(equalTo(money))); }
@Override protected Set<? extends AnnotatedElement> getElementsToProcess() { List<Member> members = ReflectionsUtil.getFilteredMembers(clazz, uiDisplayable()); Set<AnnotatedElement> elements = new LinkedHashSet<>(members.size()); for (Member member : members) { if (member instanceof AnnotatedElement) { elements.add((AnnotatedElement) member); } } return elements; }
UIDisplayableProcessor extends AbstractMapProcessor<UIDisplayable, String, Long> { @Override protected Set<? extends AnnotatedElement> getElementsToProcess() { List<Member> members = ReflectionsUtil.getFilteredMembers(clazz, uiDisplayable()); Set<AnnotatedElement> elements = new LinkedHashSet<>(members.size()); for (Member member : members) { if (member instanceof AnnotatedElement) { elements.add((AnnotatedElement) member); } } return elements; } }
UIDisplayableProcessor extends AbstractMapProcessor<UIDisplayable, String, Long> { @Override protected Set<? extends AnnotatedElement> getElementsToProcess() { List<Member> members = ReflectionsUtil.getFilteredMembers(clazz, uiDisplayable()); Set<AnnotatedElement> elements = new LinkedHashSet<>(members.size()); for (Member member : members) { if (member instanceof AnnotatedElement) { elements.add((AnnotatedElement) member); } } return elements; }  }
UIDisplayableProcessor extends AbstractMapProcessor<UIDisplayable, String, Long> { @Override protected Set<? extends AnnotatedElement> getElementsToProcess() { List<Member> members = ReflectionsUtil.getFilteredMembers(clazz, uiDisplayable()); Set<AnnotatedElement> elements = new LinkedHashSet<>(members.size()); for (Member member : members) { if (member instanceof AnnotatedElement) { elements.add((AnnotatedElement) member); } } return elements; }  @Override Class<UIDisplayable> getAnnotationType(); @Override Map<String, Long> getProcessingResult(); void setClazz(Class clazz); }
UIDisplayableProcessor extends AbstractMapProcessor<UIDisplayable, String, Long> { @Override protected Set<? extends AnnotatedElement> getElementsToProcess() { List<Member> members = ReflectionsUtil.getFilteredMembers(clazz, uiDisplayable()); Set<AnnotatedElement> elements = new LinkedHashSet<>(members.size()); for (Member member : members) { if (member instanceof AnnotatedElement) { elements.add((AnnotatedElement) member); } } return elements; }  @Override Class<UIDisplayable> getAnnotationType(); @Override Map<String, Long> getProcessingResult(); void setClazz(Class clazz);  }