Package io.jmix.flowui.sys
Class ViewControllerDependencyInjector
java.lang.Object
io.jmix.flowui.sys.ViewControllerDependencyInjector
@Component("flowui_ViewControllerDependencyInjector")
public class ViewControllerDependencyInjector
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected ViewControllerReflectionInspector
-
Constructor Summary
ConstructorDescriptionViewControllerDependencyInjector
(org.springframework.context.ApplicationContext applicationContext, ViewControllerReflectionInspector reflectionInspector) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assignValue
(AnnotatedElement element, Object value, View<?> controller) protected Object
createInstallHandler
(View<?> controller, Method method, Class<?> targetObjectType) protected MessageBundle
createMessageBundle
(View<?> controller) protected Supplier<?>
createSupplierInstance
(View<?> controller, Method method) protected void
doInjection
(ViewControllerReflectionInspector.InjectElement injectElement, View<?> controller) protected Object
findMethodTarget
(View<?> controller, String target) protected Object
findSubTargetRecursively
(com.vaadin.flow.component.Component viewLayout, String[] elements) protected com.vaadin.flow.component.ComponentEventListener
getComponentEventListener
(View<?> controller, Class<? extends View> clazz, ViewControllerReflectionInspector.AnnotatedMethod<Subscribe> annotatedMethod, Class<?> eventType) protected Consumer<?>
getConsumerListener
(View<?> controller, Class<? extends View> clazz, ViewControllerReflectionInspector.AnnotatedMethod<Subscribe> annotatedMethod, Class<?> eventType) protected Object
getInjectedInstance
(Class<?> type, String name, ViewControllerReflectionInspector.InjectElement injectElement, View<?> controller) protected String
getInjectionName
(ViewControllerReflectionInspector.InjectElement injectElement) protected Class<?>
getInjectionType
(ViewControllerReflectionInspector.InjectElement injectElement) protected Object
getInstallTargetInstance
(View<?> controller, Install annotation) protected MethodHandle
getInstallTargetSetterMethod
(Install annotation, View<?> controller, Class<?> instanceClass, Method provideMethod) protected Object
getSupplyTargetInstance
(View<?> controller, Supply annotation) protected MethodHandle
getSupplyTargetSetterMethod
(ViewControllerReflectionInspector.AnnotatedMethod<Supply> annotatedMethod, Class<?> instanceClass) protected <A extends Annotation>
ObjectgetTargetInstance
(A annotation, View<?> controller, String targetId, Target target) protected com.vaadin.flow.component.HasValue.ValueChangeListener
getValueChangeEventListener
(View<?> controller, Class<? extends View> clazz, ViewControllerReflectionInspector.AnnotatedMethod<Subscribe> annotatedMethod, Class<?> eventType) protected void
initInstallMethods
(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) protected void
initSubscribeListeners
(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) protected void
initSupplyMethods
(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) protected void
initUiEventListeners
(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) void
protected void
injectElements
(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData)
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
reflectionInspector
-
-
Constructor Details
-
ViewControllerDependencyInjector
public ViewControllerDependencyInjector(org.springframework.context.ApplicationContext applicationContext, ViewControllerReflectionInspector reflectionInspector)
-
-
Method Details
-
inject
-
injectElements
protected void injectElements(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) -
doInjection
protected void doInjection(ViewControllerReflectionInspector.InjectElement injectElement, View<?> controller) -
getInjectionName
-
getInjectionType
-
getInjectedInstance
@Nullable protected Object getInjectedInstance(Class<?> type, String name, ViewControllerReflectionInspector.InjectElement injectElement, View<?> controller) -
createMessageBundle
-
assignValue
-
initUiEventListeners
protected void initUiEventListeners(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) -
initInstallMethods
protected void initInstallMethods(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) -
getInstallTargetSetterMethod
protected MethodHandle getInstallTargetSetterMethod(Install annotation, View<?> controller, Class<?> instanceClass, Method provideMethod) -
getInstallTargetInstance
-
createInstallHandler
-
initSubscribeListeners
protected void initSubscribeListeners(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) -
getValueChangeEventListener
-
getComponentEventListener
-
getConsumerListener
-
initSupplyMethods
protected void initSupplyMethods(View<?> controller, ViewControllerReflectionInspector.ViewIntrospectionData viewIntrospectionData) -
createSupplierInstance
-
getSupplyTargetSetterMethod
protected MethodHandle getSupplyTargetSetterMethod(ViewControllerReflectionInspector.AnnotatedMethod<Supply> annotatedMethod, Class<?> instanceClass) -
getSupplyTargetInstance
-
getTargetInstance
@Nullable protected <A extends Annotation> Object getTargetInstance(A annotation, View<?> controller, String targetId, Target target) -
findMethodTarget
-
findSubTargetRecursively
-