Top Description Methods
jakarta.enterprise.inject.spi.configurator

public Interface AnnotatedParameterConfigurator<T>

Type Parameters
<T>
the class containing the method declaring the parameter
Imports
java.lang.annotation.Annotation, java.util.function.Predicate, jakarta.enterprise.inject.spi.AnnotatedParameter

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.

Authors
Martin Kouba, Antoine Sabot-Durand
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public AnnotatedParameterConfigurator<T>

Returns:

self
add
(Annotation
the annotation to add
annotation
)

Add an annotation to the parameter.

public AnnotatedParameter<T>

Returns:

the original AnnotatedParameter
getAnnotated
()

public AnnotatedParameterConfigurator<T>

Returns:

self
remove
(Predicate<Annotation>
Predicate used to filter annotations to remove
predicate
)

Remove annotations that match the specified predicate.

public default AnnotatedParameterConfigurator<T>

Returns:

self
removeAll
()

Remove all the annotations.

Method Detail

addback to summary
public AnnotatedParameterConfigurator<T> add(Annotation annotation)

Add an annotation to the parameter.

Parameters
annotation:Annotation

the annotation to add

Returns:AnnotatedParameterConfigurator<T>

self

getAnnotatedback to summary
public AnnotatedParameter<T> getAnnotated()
Returns:AnnotatedParameter<T>

the original AnnotatedParameter

removeback to summary
public AnnotatedParameterConfigurator<T> remove(Predicate<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:Predicate<Annotation>

Predicate used to filter annotations to remove

Returns:AnnotatedParameterConfigurator<T>

self

removeAllback to summary
public default AnnotatedParameterConfigurator<T> removeAll()

Remove all the annotations.

Returns:AnnotatedParameterConfigurator<T>

self