@Test public void testMatch() throws Exception { when(annotationSource.getDeclaredAnnotations()).thenReturn(annotationList); when(annotationMatcher.matches(annotationList)).thenReturn(true); assertThat(new DeclaringAnnotationMatcher<AnnotationSource>(annotationMatcher).matches(annotationSource), is(true)); verify(annotationMatcher).matches(annotationList); verifyNoMoreInteractions(annotationMatcher); verify(annotationSource).getDeclaredAnnotations(); verifyNoMoreInteractions(annotationSource); }
public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); }
DeclaringAnnotationMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); } }
DeclaringAnnotationMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); } DeclaringAnnotationMatcher(ElementMatcher<? super AnnotationList> matcher); }
DeclaringAnnotationMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); } DeclaringAnnotationMatcher(ElementMatcher<? super AnnotationList> matcher); boolean matches(T target); @Override String toString(); }
DeclaringAnnotationMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); } DeclaringAnnotationMatcher(ElementMatcher<? super AnnotationList> matcher); boolean matches(T target); @Override String toString();  }