Package io.jmix.flowui.sys.autowire
Class EventListenerDependencyInjector
java.lang.Object
io.jmix.flowui.sys.autowire.EventListenerDependencyInjector
- All Implemented Interfaces:
DependencyInjector
@Order(1000)
@Component("flowui_EventListenerDependencyInjector")
public class EventListenerDependencyInjector
extends Object
implements DependencyInjector
An injector that autowires view methods that are annotated by the
EventListener
annotation.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.sys.autowire.DependencyInjector
DependencyInjector.AutowireContext<T extends com.vaadin.flow.component.Composite<?>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected ReflectionCacheManager
-
Constructor Summary
ConstructorsConstructorDescriptionEventListenerDependencyInjector
(org.springframework.context.ApplicationContext applicationContext, ReflectionCacheManager reflectionCacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
autowire
(DependencyInjector.AutowireContext<?> autowireContext) The method is invoked when the component instance is created.boolean
isApplicable
(DependencyInjector.AutowireContext<?> autowireContext) Checks whether this injector can wire the passed injection context.
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
reflectionCacheManager
-
-
Constructor Details
-
EventListenerDependencyInjector
public EventListenerDependencyInjector(org.springframework.context.ApplicationContext applicationContext, ReflectionCacheManager reflectionCacheManager)
-
-
Method Details
-
autowire
Description copied from interface:DependencyInjector
The method is invoked when the component instance is created. Used to autowire dependencies to the UI component.- Specified by:
autowire
in interfaceDependencyInjector
- Parameters:
autowireContext
- injection context
-
isApplicable
Description copied from interface:DependencyInjector
Checks whether this injector can wire the passed injection context.- Specified by:
isApplicable
in interfaceDependencyInjector
- Parameters:
autowireContext
- injection content that need to be checked- Returns:
true
if the passed injection context can be wired,false
otherwise
-