Module jakarta.cdi
Interface AnnotatedMethodConfigurator<T>
- 
- Type Parameters:
- T- the class declaring the method
 
 public interface AnnotatedMethodConfigurator<T>This interface is part of theAnnotatedTypeConfiguratorSPI and helps defining anAnnotatedMethodCDI Lite implementations are not required to provide support for Portable Extensions. - Since:
- 2.0
- Author:
- Martin Kouba, Antoine Sabot-Durand
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AnnotatedMethodConfigurator<T>add(java.lang.annotation.Annotation annotation)Add an annotation to the method.default java.util.stream.Stream<AnnotatedParameterConfigurator<T>>filterParams(java.util.function.Predicate<AnnotatedParameter<T>> predicate)AnnotatedMethod<T>getAnnotated()java.util.List<AnnotatedParameterConfigurator<T>>params()AnnotatedMethodConfigurator<T>remove(java.util.function.Predicate<java.lang.annotation.Annotation> predicate)Remove annotations that match the specified predicate.default AnnotatedMethodConfigurator<T>removeAll()Remove all the annotations.
 
- 
- 
- 
Method Detail- 
getAnnotatedAnnotatedMethod<T> getAnnotated() - Returns:
- the original AnnotatedMethod
 
 - 
addAnnotatedMethodConfigurator<T> add(java.lang.annotation.Annotation annotation) Add an annotation to the method.- Parameters:
- annotation- the annotation to add
- Returns:
- self
 
 - 
removeAnnotatedMethodConfigurator<T> remove(java.util.function.Predicate<java.lang.annotation.Annotation> predicate) Remove annotations that match the specified 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)- Parameters:
- predicate-- Predicateused to filter annotations to remove
- Returns:
- self
 
 - 
removeAlldefault AnnotatedMethodConfigurator<T> removeAll() Remove all the annotations.- Returns:
- self
 
 - 
paramsjava.util.List<AnnotatedParameterConfigurator<T>> params() - Returns:
- an immutable list of AnnotatedParameterConfigurators reflecting theAnnotatedCallable.getParameters()
 
 - 
filterParamsdefault java.util.stream.Stream<AnnotatedParameterConfigurator<T>> filterParams(java.util.function.Predicate<AnnotatedParameter<T>> predicate) - Parameters:
- predicate- Testing the original- AnnotatedParameter
- Returns:
- a sequence of AnnotatedParameterConfigurators matching the given predicate
- See Also:
- AnnotatedParameterConfigurator.getAnnotated()
 
 
- 
 
-