Interface AnnotatedParameterConfigurator<T>

Type Parameters:
T - the class containing the method declaring the parameter

public interface AnnotatedParameterConfigurator<T>
This interface is part of the AnnotatedTypeConfigurator SPI and helps defining an AnnotatedParameter

CDI Lite implementations are not required to provide support for Portable Extensions.

Since:
2.0
Author:
Martin Kouba, Antoine Sabot-Durand
  • Method Details

    • getAnnotated

      AnnotatedParameter<T> getAnnotated()
      Returns:
      the original AnnotatedParameter
    • add

      Add an annotation to the parameter.
      Parameters:
      annotation - the annotation to add
      Returns:
      self
    • remove

      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 - Predicate used to filter annotations to remove
      Returns:
      self
    • removeAll

      default AnnotatedParameterConfigurator<T> removeAll()
      Remove all the annotations.
      Returns:
      self