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

public Interface AnnotatedConstructorConfigurator<T>

Type Parameters
<T>
the class declaring the constructor
Imports
java.lang.annotation.Annotation, java.util.List, java.util.function.Predicate, java.util.stream.Stream, jakarta.enterprise.inject.spi.AnnotatedConstructor, .AnnotatedParameter

This interface is part of the AnnotatedTypeConfigurator SPI and helps defining an AnnotatedConstructor

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 AnnotatedConstructorConfigurator<T>

Returns:

self
add
(Annotation
the annotation to add
annotation
)

Add an annotation to the constructor.

public default Stream<AnnotatedParameterConfigurator<T>>

Returns:

a sequence of AnnotatedParameterConfigurators matching the given predicate
filterParams
(Predicate<AnnotatedParameter<T>>
Testing the original AnnotatedParameter
predicate
)

public AnnotatedConstructor<T>

Returns:

the original AnnotatedConstructor
getAnnotated
()

public List<AnnotatedParameterConfigurator<T>>

Returns:

an immutable list of AnnotatedParameterConfigurators reflecting the AnnotatedConstructor#getParameters()
params
()

public AnnotatedConstructorConfigurator<T>

Returns:

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

Remove annotations that match the specified predicate.

public default AnnotatedConstructorConfigurator<T>

Returns:

self
removeAll
()

Remove all the annotations.

Method Detail

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

Add an annotation to the constructor.

Parameters
annotation:Annotation

the annotation to add

Returns:AnnotatedConstructorConfigurator<T>

self

filterParamsback to summary
public default Stream<AnnotatedParameterConfigurator<T>> filterParams(Predicate<AnnotatedParameter<T>> predicate)
Parameters
predicate:Predicate<AnnotatedParameter<T>>

Testing the original AnnotatedParameter

Returns:Stream<AnnotatedParameterConfigurator<T>>

a sequence of AnnotatedParameterConfigurators matching the given predicate

See Also
AnnotatedParameterConfigurator#getAnnotated()
getAnnotatedback to summary
public AnnotatedConstructor<T> getAnnotated()
Returns:AnnotatedConstructor<T>

the original AnnotatedConstructor

paramsback to summary
public List<AnnotatedParameterConfigurator<T>> params()
Returns:List<AnnotatedParameterConfigurator<T>>

an immutable list of AnnotatedParameterConfigurators reflecting the AnnotatedConstructor#getParameters()

removeback to summary
public AnnotatedConstructorConfigurator<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:AnnotatedConstructorConfigurator<T>

self

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

Remove all the annotations.

Returns:AnnotatedConstructorConfigurator<T>

self