T
- the class containing the method declaring the parameterpublic interface AnnotatedParameterConfigurator<T>
AnnotatedTypeConfigurator
SPI and helps defining an AnnotatedParameter
Modifier and Type | Method and Description |
---|---|
AnnotatedParameterConfigurator<T> |
add(Annotation annotation)
Add an annotation to the parameter.
|
AnnotatedParameter<T> |
getAnnotated() |
AnnotatedParameterConfigurator<T> |
remove(Predicate<Annotation> predicate)
Remove annotations that match the specified predicate.
|
default AnnotatedParameterConfigurator<T> |
removeAll()
Remove all the annotations.
|
AnnotatedParameter<T> getAnnotated()
AnnotatedParameter
AnnotatedParameterConfigurator<T> add(Annotation annotation)
annotation
- the annotation to addAnnotatedParameterConfigurator<T> remove(Predicate<Annotation> predicate)
Example predicates:
// To remove all the annotations:
(a) -> true
// To remove annotations with a concrete annotation type:
(a) -> a.annotationType().equals(Foo.class)
// To remove annotation equal to a specified object:
(a) -> a.equals(fooAnnotation)
// To remove annotations that are considered equivalent for the purposes of typesafe resolution:
(a) -> beanManager.areQualifiersEquivalent(a, fooQualifier)
(a) -> beanManager.areInterceptorBindingsEquivalent(a, fooInterceptorBinding)
predicate
- Predicate
used to filter annotations to removedefault AnnotatedParameterConfigurator<T> removeAll()
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.