Package com.vaadin.cdi
Class AbstractCdiInstantiator
java.lang.Object
com.vaadin.cdi.AbstractCdiInstantiator
- All Implemented Interfaces:
com.vaadin.flow.di.Instantiator,Serializable
- Direct Known Subclasses:
CdiInstantiator
public abstract class AbstractCdiInstantiator
extends Object
implements com.vaadin.flow.di.Instantiator
Base class for CDI-aware instantiators. Looks up instances as CDI beans
through the
BeanManager, and falls back to a
DefaultInstantiator delegate when no suitable bean is found.- Since:
- 11.2
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract jakarta.enterprise.inject.spi.BeanManagerGets the bean manager used for looking up CDI beans.protected abstract com.vaadin.flow.di.DefaultInstantiatorGets the instantiator used when an instance cannot be provided as a CDI bean.com.vaadin.flow.i18n.I18NProvidercom.vaadin.flow.server.auth.MenuAccessControl<T> TgetOrCreate(Class<T> type) com.vaadin.flow.router.PageTitleGeneratorStream<com.vaadin.flow.server.VaadinServiceInitListener> 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
createComponent, createRouteTarget, getApplicationClass, getApplicationClass, getDependencyFilters, getIndexHtmlRequestListeners
-
Constructor Details
-
AbstractCdiInstantiator
public AbstractCdiInstantiator()Creates a new CDI instantiator.
-
-
Method Details
-
getDelegate
protected abstract com.vaadin.flow.di.DefaultInstantiator getDelegate()Gets the instantiator used when an instance cannot be provided as a CDI bean.- Returns:
- the fallback instantiator
- Since:
- 15.0
-
getBeanManager
public abstract jakarta.enterprise.inject.spi.BeanManager getBeanManager()Gets the bean manager used for looking up CDI beans.- Returns:
- the bean manager
-
getOrCreate
- Specified by:
getOrCreatein interfacecom.vaadin.flow.di.Instantiator
-
getI18NProvider
public com.vaadin.flow.i18n.I18NProvider getI18NProvider()- Specified by:
getI18NProviderin interfacecom.vaadin.flow.di.Instantiator
-
getMenuAccessControl
public com.vaadin.flow.server.auth.MenuAccessControl getMenuAccessControl()- Specified by:
getMenuAccessControlin interfacecom.vaadin.flow.di.Instantiator
-
getPageTitleGenerator
public com.vaadin.flow.router.PageTitleGenerator getPageTitleGenerator()- Specified by:
getPageTitleGeneratorin interfacecom.vaadin.flow.di.Instantiator
-
getServiceInitListeners
- Specified by:
getServiceInitListenersin interfacecom.vaadin.flow.di.Instantiator
-