Module jakarta.cdi

Interface BeanAttributesConfigurator<T>

  • Type Parameters:
    T - the class of the bean instance

    public interface BeanAttributesConfigurator<T>
    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.

    Since:
    2.0
    Author:
    Antoine Sabot-Durand
    See Also:
    ProcessBeanAttributes.configureBeanAttributes()
    • Method Detail

      • addType

        BeanAttributesConfigurator<T> addType​(java.lang.reflect.Type type)
        Add a type to the bean types
        Parameters:
        type - the type to add
        Returns:
        self
      • addTypes

        BeanAttributesConfigurator<T> addTypes​(java.lang.reflect.Type... types)
        Add types to the bean types
        Parameters:
        types - types to add
        Returns:
        self
      • addTypes

        BeanAttributesConfigurator<T> addTypes​(java.util.Set<java.lang.reflect.Type> types)
        Add types to the bean types
        Parameters:
        types - types to add
        Returns:
        self
      • addTransitiveTypeClosure

        BeanAttributesConfigurator<T> addTransitiveTypeClosure​(java.lang.reflect.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 - to build the closure from
        Returns:
        self
      • types

        BeanAttributesConfigurator<T> types​(java.lang.reflect.Type... types)
        Replace bean types
        Parameters:
        types - the types of the configured bean
        Returns:
        self
      • types

        BeanAttributesConfigurator<T> types​(java.util.Set<java.lang.reflect.Type> types)
        Replace bean types
        Parameters:
        types - the types of the configured bean
        Returns:
        self
      • scope

        BeanAttributesConfigurator<T> scope​(java.lang.Class<? extends java.lang.annotation.Annotation> scope)
        Replace Bean scope
        Parameters:
        scope - new scope for the configured bean
        Returns:
        self
      • addQualifier

        BeanAttributesConfigurator<T> addQualifier​(java.lang.annotation.Annotation qualifier)
        Add a qualifier to the configured bean
        Parameters:
        qualifier - qualifier to add
        Returns:
        self
      • addQualifiers

        BeanAttributesConfigurator<T> addQualifiers​(java.lang.annotation.Annotation... qualifiers)
        Add qualifiers to the bean.
        Parameters:
        qualifiers - qualifiers to add
        Returns:
        self
      • addQualifiers

        BeanAttributesConfigurator<T> addQualifiers​(java.util.Set<java.lang.annotation.Annotation> qualifiers)
        Add qualifiers to the bean.
        Parameters:
        qualifiers - qualifiers to add
        Returns:
        self
      • qualifiers

        BeanAttributesConfigurator<T> qualifiers​(java.lang.annotation.Annotation... qualifiers)
        Replace all qualifiers.
        Parameters:
        qualifiers - qualifiers for the build bean
        Returns:
        self
      • qualifiers

        BeanAttributesConfigurator<T> qualifiers​(java.util.Set<java.lang.annotation.Annotation> qualifiers)
        Replace all qualifiers.
        Parameters:
        qualifiers - for the configured bean
        Returns:
        self
      • addStereotype

        BeanAttributesConfigurator<T> addStereotype​(java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
        Add a stereotype to the configured bean
        Parameters:
        stereotype - stereotype to add
        Returns:
        self
      • addStereotypes

        BeanAttributesConfigurator<T> addStereotypes​(java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> stereotypes)
        Add stereotypes to the configured bean
        Parameters:
        stereotypes - stereotypes to add
        Returns:
        self
      • stereotypes

        BeanAttributesConfigurator<T> stereotypes​(java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> stereotypes)
        Replace stereotypes on the configured bean
        Parameters:
        stereotypes - for the configured bean
        Returns:
        self
      • name

        BeanAttributesConfigurator<T> name​(java.lang.String name)
        Set the name of the configured bean
        Parameters:
        name - name for the configured bean
        Returns:
        self
      • alternative

        BeanAttributesConfigurator<T> alternative​(boolean value)
        Change the alternative status of the configured bean. By default the configured bean is not an alternative.
        Parameters:
        value - value for alternative property
        Returns:
        self