[cdi-dev] [JBoss JIRA] (CDI-605) Add some built in predicates

John Ament (JIRA) issues at jboss.org
Thu May 26 20:56:00 EDT 2016

John Ament created CDI-605:

             Summary: Add some built in predicates
                 Key: CDI-605
                 URL: https://issues.jboss.org/browse/CDI-605
             Project: CDI Specification Issues
          Issue Type: Feature Request
          Components: Javadoc and API
            Reporter: John Ament

During review, Antonin pointed out some useful predicates that should be reusable in the context of CDI.


    static Predicate<Bean> hasType(Type type) {
        return bean -> bean.getTypes().contains(type);

    static Predicate<Annotation> isAnnotationType(Class<? extends Annotation> clazz) {
        return annotation -> clazz.equals(annotation.annotationType());

We should consider adding them.

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list