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

public Interface BeanAttributesConfigurator<T>

Type Parameters
<T>
the class of the bean instance
Imports
java.lang.annotation.Annotation, java.lang.reflect.Type, java.util.Set, jakarta.enterprise.inject.spi.BeanAttributes, .ProcessBeanAttributes, jakarta.enterprise.util.TypeLiteral

This API is an helper to configure a new BeanAttributes instance. CDI container must provides an implementation of this interface. This configurator is not thread safe and shall not be used concurrently.

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

Author
Antoine Sabot-Durand
Since
2.0
See Also
ProcessBeanAttributes#configureBeanAttributes()

Method Summary

Modifier and TypeMethod and Description
public BeanAttributesConfigurator<T>

Returns:

self
addQualifier
(Annotation
qualifier to add
qualifier
)

Add a qualifier to the configured bean

public BeanAttributesConfigurator<T>

Returns:

self
addQualifiers
(Annotation...
qualifiers to add
qualifiers
)

Add qualifiers to the bean.

public BeanAttributesConfigurator<T>

Returns:

self
addQualifiers
(Set<Annotation>
qualifiers to add
qualifiers
)

Add qualifiers to the bean.

public BeanAttributesConfigurator<T>

Returns:

self
addStereotype
(Class<? extends Annotation>
stereotype to add
stereotype
)

Add a stereotype to the configured bean

public BeanAttributesConfigurator<T>

Returns:

self
addStereotypes
(Set<Class<? extends Annotation>>
stereotypes to add
stereotypes
)

Add stereotypes to the configured bean

public BeanAttributesConfigurator<T>

Returns:

self
addTransitiveTypeClosure
(Type
to build the closure from
type
)

Adds an unrestricted set of bean types for the given type as if it represented a bean class of a managed bean.

public BeanAttributesConfigurator<T>

Returns:

self
addType
(Type
the type to add
type
)

Add a type to the bean types

public BeanAttributesConfigurator<T>

Returns:

self
addType
(TypeLiteral<?>
the type to add
typeLiteral
)

Add a type to the bean types

public BeanAttributesConfigurator<T>

Returns:

self
addTypes
(Type...
types to add
types
)

Add types to the bean types

public BeanAttributesConfigurator<T>

Returns:

self
addTypes
(Set<Type>
types to add
types
)

Add types to the bean types

public BeanAttributesConfigurator<T>

Returns:

self
alternative
(boolean
value for alternative property
value
)

Change the alternative status of the configured bean.

public BeanAttributesConfigurator<T>

Returns:

self
name
(String
name for the configured bean
name
)

Set the name of the configured bean

public BeanAttributesConfigurator<T>

Returns:

self
qualifiers
(Annotation...
qualifiers for the build bean
qualifiers
)

Replace all qualifiers.

public BeanAttributesConfigurator<T>

Returns:

self
qualifiers
(Set<Annotation>
for the configured bean
qualifiers
)

Replace all qualifiers.

public BeanAttributesConfigurator<T>

Returns:

self
scope
(Class<? extends Annotation>
new scope for the configured bean
scope
)

Replace Bean scope

public BeanAttributesConfigurator<T>

Returns:

self
stereotypes
(Set<Class<? extends Annotation>>
for the configured bean
stereotypes
)

Replace stereotypes on the configured bean

public BeanAttributesConfigurator<T>

Returns:

self
types
(Type...
the types of the configured bean
types
)

Replace bean types

public BeanAttributesConfigurator<T>

Returns:

self
types
(Set<Type>
the types of the configured bean
types
)

Replace bean types

Method Detail

addQualifierback to summary
public BeanAttributesConfigurator<T> addQualifier(Annotation qualifier)

Add a qualifier to the configured bean

Parameters
qualifier:Annotation

qualifier to add

Returns:BeanAttributesConfigurator<T>

self

addQualifiersback to summary
public BeanAttributesConfigurator<T> addQualifiers(Annotation... qualifiers)

Add qualifiers to the bean.

Parameters
qualifiers:Annotation[]

qualifiers to add

Returns:BeanAttributesConfigurator<T>

self

addQualifiersback to summary
public BeanAttributesConfigurator<T> addQualifiers(Set<Annotation> qualifiers)

Add qualifiers to the bean.

Parameters
qualifiers:Set<Annotation>

qualifiers to add

Returns:BeanAttributesConfigurator<T>

self

addStereotypeback to summary
public BeanAttributesConfigurator<T> addStereotype(Class<? extends Annotation> stereotype)

Add a stereotype to the configured bean

Parameters
stereotype:Class<? extends Annotation>

stereotype to add

Returns:BeanAttributesConfigurator<T>

self

addStereotypesback to summary
public BeanAttributesConfigurator<T> addStereotypes(Set<Class<? extends Annotation>> stereotypes)

Add stereotypes to the configured bean

Parameters
stereotypes:Set<Class<? extends Annotation>>

stereotypes to add

Returns:BeanAttributesConfigurator<T>

self

addTransitiveTypeClosureback to summary
public BeanAttributesConfigurator<T> addTransitiveTypeClosure(Type type)

Adds an unrestricted set of bean types for the given type as if it represented a bean class of a managed bean. Illegal bean types are omitted.

Parameters
type:Type

to build the closure from

Returns:BeanAttributesConfigurator<T>

self

addTypeback to summary
public BeanAttributesConfigurator<T> addType(Type type)

Add a type to the bean types

Parameters
type:Type

the type to add

Returns:BeanAttributesConfigurator<T>

self

addTypeback to summary
public BeanAttributesConfigurator<T> addType(TypeLiteral<?> typeLiteral)

Add a type to the bean types

Parameters
typeLiteral:TypeLiteral<?>

the type to add

Returns:BeanAttributesConfigurator<T>

self

addTypesback to summary
public BeanAttributesConfigurator<T> addTypes(Type... types)

Add types to the bean types

Parameters
types:Type[]

types to add

Returns:BeanAttributesConfigurator<T>

self

addTypesback to summary
public BeanAttributesConfigurator<T> addTypes(Set<Type> types)

Add types to the bean types

Parameters
types:Set<Type>

types to add

Returns:BeanAttributesConfigurator<T>

self

alternativeback to summary
public BeanAttributesConfigurator<T> alternative(boolean value)

Change the alternative status of the configured bean. By default the configured bean is not an alternative.

Parameters
value:boolean

value for alternative property

Returns:BeanAttributesConfigurator<T>

self

nameback to summary
public BeanAttributesConfigurator<T> name(String name)

Set the name of the configured bean

Parameters
name:String

name for the configured bean

Returns:BeanAttributesConfigurator<T>

self

qualifiersback to summary
public BeanAttributesConfigurator<T> qualifiers(Annotation... qualifiers)

Replace all qualifiers.

Parameters
qualifiers:Annotation[]

qualifiers for the build bean

Returns:BeanAttributesConfigurator<T>

self

qualifiersback to summary
public BeanAttributesConfigurator<T> qualifiers(Set<Annotation> qualifiers)

Replace all qualifiers.

Parameters
qualifiers:Set<Annotation>

for the configured bean

Returns:BeanAttributesConfigurator<T>

self

scopeback to summary
public BeanAttributesConfigurator<T> scope(Class<? extends Annotation> scope)

Replace Bean scope

Parameters
scope:Class<? extends Annotation>

new scope for the configured bean

Returns:BeanAttributesConfigurator<T>

self

stereotypesback to summary
public BeanAttributesConfigurator<T> stereotypes(Set<Class<? extends Annotation>> stereotypes)

Replace stereotypes on the configured bean

Parameters
stereotypes:Set<Class<? extends Annotation>>

for the configured bean

Returns:BeanAttributesConfigurator<T>

self

typesback to summary
public BeanAttributesConfigurator<T> types(Type... types)

Replace bean types

Parameters
types:Type[]

the types of the configured bean

Returns:BeanAttributesConfigurator<T>

self

typesback to summary
public BeanAttributesConfigurator<T> types(Set<Type> types)

Replace bean types

Parameters
types:Set<Type>

the types of the configured bean

Returns:BeanAttributesConfigurator<T>

self