@Test public void testIsPresentOn() { assertThat(MetaAnnotation.of(MetaMarkerAnnotation.class).isPresentOn(annotatedAnnotation)); }
public boolean isPresentOn(@CheckForNull Annotation annotation) { if (annotation != null) { return repeatable ? annotation.annotationType().getAnnotationsByType(metaAnnotationClass).length > 0 : annotation.annotationType().isAnnotationPresent(metaAnnotationClass); } else { return false; } }
MetaAnnotation { public boolean isPresentOn(@CheckForNull Annotation annotation) { if (annotation != null) { return repeatable ? annotation.annotationType().getAnnotationsByType(metaAnnotationClass).length > 0 : annotation.annotationType().isAnnotationPresent(metaAnnotationClass); } else { return false; } } }
MetaAnnotation { public boolean isPresentOn(@CheckForNull Annotation annotation) { if (annotation != null) { return repeatable ? annotation.annotationType().getAnnotationsByType(metaAnnotationClass).length > 0 : annotation.annotationType().isAnnotationPresent(metaAnnotationClass); } else { return false; } } private  MetaAnnotation(Class<META> metaAnnotationClass); }
MetaAnnotation { public boolean isPresentOn(@CheckForNull Annotation annotation) { if (annotation != null) { return repeatable ? annotation.annotationType().getAnnotationsByType(metaAnnotationClass).length > 0 : annotation.annotationType().isAnnotationPresent(metaAnnotationClass); } else { return false; } } private  MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolean isPresentOnAnyAnnotationOn(AnnotatedElement annotatedElement); boolean isPresentOn(@CheckForNull Annotation annotation); Optional<META> findOn(Annotation annotation); Stream<META> findAllOn(Annotation annotation); Stream<Annotation> findAnnotatedAnnotationsOn(AnnotatedElement annotatedElement); BinaryOperator<A> onlyOneOn(AnnotatedElement annotatedElement); Supplier<? extends IllegalArgumentException> missingAnnotation(Annotation annotation,
            AnnotatedElement annotatedElement,
            String checkerMethod); }
MetaAnnotation { public boolean isPresentOn(@CheckForNull Annotation annotation) { if (annotation != null) { return repeatable ? annotation.annotationType().getAnnotationsByType(metaAnnotationClass).length > 0 : annotation.annotationType().isAnnotationPresent(metaAnnotationClass); } else { return false; } } private  MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolean isPresentOnAnyAnnotationOn(AnnotatedElement annotatedElement); boolean isPresentOn(@CheckForNull Annotation annotation); Optional<META> findOn(Annotation annotation); Stream<META> findAllOn(Annotation annotation); Stream<Annotation> findAnnotatedAnnotationsOn(AnnotatedElement annotatedElement); BinaryOperator<A> onlyOneOn(AnnotatedElement annotatedElement); Supplier<? extends IllegalArgumentException> missingAnnotation(Annotation annotation,
            AnnotatedElement annotatedElement,
            String checkerMethod);  }