Class QuarkusInstantiator

java.lang.Object
com.vaadin.quarkus.QuarkusInstantiator
All Implemented Interfaces:
Instantiator, Serializable

public class QuarkusInstantiator extends Object implements Instantiator
Instantiator implementation for Quarkus. New instances are created by default by QuarkusInstantiatorFactory.
See Also:
  • Constructor Details

    • QuarkusInstantiator

      public QuarkusInstantiator(DefaultInstantiator delegate, jakarta.enterprise.inject.spi.BeanManager beanManager)
  • Method Details

    • getBeanManager

      public jakarta.enterprise.inject.spi.BeanManager getBeanManager()
      Gets the BeanManager instance.
      Returns:
      the BeanManager instance.
    • getOrCreate

      public <T> T getOrCreate(Class<T> type)
      Description copied from interface: Instantiator
      Provides an instance of any given type, this is an abstraction that allows to make use of DI-frameworks from add-ons.

      How the object is created and whether it is being cached or not is up to the implementation.

      Specified by:
      getOrCreate in interface Instantiator
      Type Parameters:
      T - the type of the instance to create
      Parameters:
      type - the instance type to create, not null
      Returns:
      an instance of the given type
    • getI18NProvider

      public I18NProvider getI18NProvider()
      Description copied from interface: Instantiator
      Get the I18NProvider if one has been defined.
      Specified by:
      getI18NProvider in interface Instantiator
      Returns:
      I18NProvider instance
    • getMenuAccessControl

      public MenuAccessControl getMenuAccessControl()
      Description copied from interface: Instantiator
      Get the MenuAccessControl.
      Specified by:
      getMenuAccessControl in interface Instantiator
      Returns:
      MenuAccessControl instance
    • getServiceInitListeners

      public Stream<VaadinServiceInitListener> getServiceInitListeners()
      Description copied from interface: Instantiator
      Gets all service init listeners to use. In addition to listeners defined in some way native to a specific instantiator, it is also recommended to support the default ServiceLoader convention. This can be done by including the items from DefaultInstantiator.getServiceInitListeners() in the returned stream.
      Specified by:
      getServiceInitListeners in interface Instantiator
      Returns:
      stream of service init listeners, not null
    • createComponent

      public <T extends Component> T createComponent(Class<T> componentClass)
      Description copied from interface: Instantiator
      Creates an instance of a component by its componentClass.
      Specified by:
      createComponent in interface Instantiator
      Type Parameters:
      T - the component type
      Parameters:
      componentClass - the instance type to create, not null
      Returns:
      the created instance, not null