Class AfterBeanDiscoveryImpl

All Implemented Interfaces:
jakarta.enterprise.inject.spi.AfterBeanDiscovery, WeldAfterBeanDiscovery, NotificationListener

public class AfterBeanDiscoveryImpl extends AbstractBeanDiscoveryEvent implements WeldAfterBeanDiscovery
  • Method Details

    • fire

      public static void fire(BeanManagerImpl beanManager, org.jboss.weld.bootstrap.spi.Deployment deployment, BeanDeploymentArchiveMapping bdaMapping, Collection<ContextHolder<? extends jakarta.enterprise.context.spi.Context>> contexts)
    • addBean

      public void addBean(jakarta.enterprise.inject.spi.Bean<?> bean)
      Specified by:
      addBean in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • addBean

      public <T> WeldBeanConfigurator<T> addBean()
      Description copied from interface: WeldAfterBeanDiscovery
      Obtain a WeldBeanConfigurator, an extended version of BeanConfigurator.

      The configurator behaves in the same manner as BeanConfigurator. Configured bean is added automatically at the end of the observer invocation.

      Each call returns new configurator instance.

      Specified by:
      addBean in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
      Specified by:
      addBean in interface WeldAfterBeanDiscovery
      Returns:
      a configurator to configure custom new bean
    • addBean

      public <T> WeldBeanConfigurator<T> addBean(Class<?> receiverClass, Class<?> fallbackClass)
      Used by LiteExtensionTranslator to register beans coming from Build Compatible extensions. This ensures that the bean is registered under given BCE class instead of being linked to LiteExtensionTranslator. This method should not be used anywhere else.
      Type Parameters:
      T - bean type
      Parameters:
      receiverClass - class of the Build Compatible extension performing synth. bean registration
      fallbackClass - fallback receiver class for BCEs coming from non-CDI archives; can be null
      Returns:
      instance of WeldBeanConfigurator
    • addContext

      public void addContext(jakarta.enterprise.context.spi.Context context)
      Specified by:
      addContext in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • addObserverMethod

      public void addObserverMethod(jakarta.enterprise.inject.spi.ObserverMethod<?> observerMethod)
      Specified by:
      addObserverMethod in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • addObserverMethod

      public <T> jakarta.enterprise.inject.spi.configurator.ObserverMethodConfigurator<T> addObserverMethod()
      Specified by:
      addObserverMethod in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • getAnnotatedType

      public <T> jakarta.enterprise.inject.spi.AnnotatedType<T> getAnnotatedType(Class<T> type, String id)
      Specified by:
      getAnnotatedType in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • getAnnotatedTypes

      public <T> Iterable<jakarta.enterprise.inject.spi.AnnotatedType<T>> getAnnotatedTypes(Class<T> type)
      Specified by:
      getAnnotatedTypes in interface jakarta.enterprise.inject.spi.AfterBeanDiscovery
    • addInterceptor

      public InterceptorConfigurator addInterceptor()
      Description copied from interface: WeldAfterBeanDiscovery
      Obtain a InterceptorConfigurator to configure a new Interceptor.

      The configured interceptor is automatically added at the end of the observer invocation.

      Each call returns a new configurator instance.

      Specified by:
      addInterceptor in interface WeldAfterBeanDiscovery
      Returns:
      a configurator to configure a new interceptor