@Test public void hasAnnotatedMember_both_false() { assertFalse(CdiUtilities.hasAnnotatedMember(new HasAnnotatedField(), FirstFieldAnnotation.class, SecondFieldAnnotation.class)); }
@SafeVarargs public static boolean hasAnnotatedMember(final Bean<?> bean, final Class<? extends Annotation>... classes) { final Predicate<Field> hasAllAnnotations = field -> stream(classes).allMatch(field::isAnnotationPresent); return stream(bean.getBeanClass().getDeclaredFields()).anyMatch( hasAllAnnotations); }
CdiUtilities { @SafeVarargs public static boolean hasAnnotatedMember(final Bean<?> bean, final Class<? extends Annotation>... classes) { final Predicate<Field> hasAllAnnotations = field -> stream(classes).allMatch(field::isAnnotationPresent); return stream(bean.getBeanClass().getDeclaredFields()).anyMatch( hasAllAnnotations); } }
CdiUtilities { @SafeVarargs public static boolean hasAnnotatedMember(final Bean<?> bean, final Class<? extends Annotation>... classes) { final Predicate<Field> hasAllAnnotations = field -> stream(classes).allMatch(field::isAnnotationPresent); return stream(bean.getBeanClass().getDeclaredFields()).anyMatch( hasAllAnnotations); }  }
CdiUtilities { @SafeVarargs public static boolean hasAnnotatedMember(final Bean<?> bean, final Class<? extends Annotation>... classes) { final Predicate<Field> hasAllAnnotations = field -> stream(classes).allMatch(field::isAnnotationPresent); return stream(bean.getBeanClass().getDeclaredFields()).anyMatch( hasAllAnnotations); }  @SuppressWarnings("unchecked") static T getReference(final BeanManager beanManager,
            final Bean<T> bean,
            final Type beanType); static T getReference(final BeanManager beanManager, final Class<T> clazz); static final boolean hasAnnotatedMethod(final AnnotatedType<?> at,
            final Class<? extends Annotation> annotationClazz); @SafeVarargs static boolean hasAnnotatedMember(final Bean<?> bean,
            final Class<? extends Annotation>... classes); static BeanManager getBeanManager(); }
CdiUtilities { @SafeVarargs public static boolean hasAnnotatedMember(final Bean<?> bean, final Class<? extends Annotation>... classes) { final Predicate<Field> hasAllAnnotations = field -> stream(classes).allMatch(field::isAnnotationPresent); return stream(bean.getBeanClass().getDeclaredFields()).anyMatch( hasAllAnnotations); }  @SuppressWarnings("unchecked") static T getReference(final BeanManager beanManager,
            final Bean<T> bean,
            final Type beanType); static T getReference(final BeanManager beanManager, final Class<T> clazz); static final boolean hasAnnotatedMethod(final AnnotatedType<?> at,
            final Class<? extends Annotation> annotationClazz); @SafeVarargs static boolean hasAnnotatedMember(final Bean<?> bean,
            final Class<? extends Annotation>... classes); static BeanManager getBeanManager();  }