Package com.vaadin.quarkus
Class QuarkusInstantiator
java.lang.Object
com.vaadin.quarkus.QuarkusInstantiator
- All Implemented Interfaces:
Instantiator,Serializable
Instantiator implementation for Quarkus.
New instances are created by default by QuarkusInstantiatorFactory.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQuarkusInstantiator(DefaultInstantiator delegate, jakarta.enterprise.inject.spi.BeanManager beanManager) -
Method Summary
Modifier and TypeMethodDescription<T extends Component>
TcreateComponent(Class<T> componentClass) Creates an instance of a component by itscomponentClass.jakarta.enterprise.inject.spi.BeanManagerGets theBeanManagerinstance.Get the I18NProvider if one has been defined.Get the MenuAccessControl.<T> TgetOrCreate(Class<T> type) Provides an instance of any given type, this is an abstraction that allows to make use of DI-frameworks from add-ons.Gets all service init listeners to use.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.di.Instantiator
createRouteTarget, getApplicationClass, getApplicationClass, getDependencyFilters, getIndexHtmlRequestListeners
-
Constructor Details
-
QuarkusInstantiator
public QuarkusInstantiator(DefaultInstantiator delegate, jakarta.enterprise.inject.spi.BeanManager beanManager)
-
-
Method Details
-
getBeanManager
public jakarta.enterprise.inject.spi.BeanManager getBeanManager()Gets theBeanManagerinstance.- Returns:
- the
BeanManagerinstance.
-
getOrCreate
Description copied from interface:InstantiatorProvides 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:
getOrCreatein interfaceInstantiator- Type Parameters:
T- the type of the instance to create- Parameters:
type- the instance type to create, notnull- Returns:
- an instance of the given type
-
getI18NProvider
Description copied from interface:InstantiatorGet the I18NProvider if one has been defined.- Specified by:
getI18NProviderin interfaceInstantiator- Returns:
- I18NProvider instance
-
getMenuAccessControl
Description copied from interface:InstantiatorGet the MenuAccessControl.- Specified by:
getMenuAccessControlin interfaceInstantiator- Returns:
- MenuAccessControl instance
-
getServiceInitListeners
Description copied from interface:InstantiatorGets 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 defaultServiceLoaderconvention. This can be done by including the items fromDefaultInstantiator.getServiceInitListeners()in the returned stream.- Specified by:
getServiceInitListenersin interfaceInstantiator- Returns:
- stream of service init listeners, not
null
-
createComponent
Description copied from interface:InstantiatorCreates an instance of a component by itscomponentClass.- Specified by:
createComponentin interfaceInstantiator- Type Parameters:
T- the component type- Parameters:
componentClass- the instance type to create, notnull- Returns:
- the created instance, not
null
-