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.
https://github.com/astefanutti/camel-cdi/blob/0c9ae969c5721e655da3d396d17...
{code}
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());
}
{code}
We should consider adding them.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)