Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-605

Add some built in predicates

    XMLWordPrintable

Details

    • Feature Request
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Out of Date
    • None
    • None
    • Javadoc and API
    • None

    Description

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

      https://github.com/astefanutti/camel-cdi/blob/0c9ae969c5721e655da3d396d17ec98a6f1aecaa/impl/src/main/java/org/apache/camel/cdi/CdiSpiHelper.java#L49-L57

          static Predicate<Bean> hasType(Type type) {
              requireNonNull(type);
              return bean -> bean.getTypes().contains(type);
          }
      
          static Predicate<Annotation> isAnnotationType(Class<? extends Annotation> clazz) {
              requireNonNull(clazz);
              return annotation -> clazz.equals(annotation.annotationType());
          }
      

      We should consider adding them.

      Attachments

        Activity

          People

            Unassigned Unassigned
            meetoblivion_jira John Ament (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: