Class CdiInstantiator

All Implemented Interfaces:
com.vaadin.flow.di.Instantiator, Serializable

public class CdiInstantiator extends AbstractCdiInstantiator
Default CDI instantiator.
Since:
10.0
See Also:
  • Constructor Details

    • CdiInstantiator

      public CdiInstantiator(jakarta.enterprise.inject.spi.BeanManager beanManager, com.vaadin.flow.server.VaadinService service)
      Creates a new CDI instantiator for the given service.
      Parameters:
      beanManager - the bean manager used for looking up CDI beans
      service - the Vaadin service the instantiator is created for
      Since:
      15.0
  • Method Details

    • getDelegate

      protected com.vaadin.flow.di.DefaultInstantiator getDelegate()
      Description copied from class: AbstractCdiInstantiator
      Gets the instantiator used when an instance cannot be provided as a CDI bean.
      Specified by:
      getDelegate in class AbstractCdiInstantiator
      Returns:
      the fallback instantiator
    • getBeanManager

      public jakarta.enterprise.inject.spi.BeanManager getBeanManager()
      Description copied from class: AbstractCdiInstantiator
      Gets the bean manager used for looking up CDI beans.
      Specified by:
      getBeanManager in class AbstractCdiInstantiator
      Returns:
      the bean manager
    • createComponent

      public <T extends com.vaadin.flow.component.Component> T createComponent(Class<T> componentClass)