Package io.jmix.flowui.sys
Class UiControllerReflectionInspector
java.lang.Object
io.jmix.flowui.sys.UiControllerReflectionInspector
@Component("flowui_UiControllerReflectionInspector")
public class UiControllerReflectionInspector
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Function<Class,MethodHandles.Lookup> protected final com.google.common.cache.Cache<MethodHandle,MethodHandle> protected final com.google.common.cache.LoadingCache<Class<?>,UiControllerReflectionInspector.ScreenIntrospectionData> protected final com.google.common.cache.LoadingCache<Class<?>,UiControllerReflectionInspector.TargetIntrospectionData> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear underlying reflection caches.protected intcompareSubscribeMethods(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1, UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2) protected <A extends Annotation>
UiControllerReflectionInspector.AnnotatedMethod<A>createAnnotatedMethod(Class<A> annotationClass, Method method) getAddListenerMethod(Class<?> clazz, Class<?> eventType) protected Map<Class,MethodHandle> getAddListenerMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) getAllFields(List<Class<?>> classes) getAnnotatedInjectElementsNotCached(Class<?> clazz) getAnnotatedInstallMethodsNotCached(Method[] uniqueDeclaredMethods) getAnnotatedListenerMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) getAnnotatedSubscribeMethodsNotCached(Method[] uniqueDeclaredMethods) getComponentEventListenerMethodFactory(Class<?> ownerClass, UiControllerReflectionInspector.AnnotatedMethod annotatedMethod, Class<?> eventClass) getConsumerMethodFactory(Class<?> ownerClass, UiControllerReflectionInspector.AnnotatedMethod annotatedMethod, Class<?> eventClass) protected Class<?>getDeclaringClass(Method method) getInstallTargetMethod(Class<?> clazz, String methodName) protected Map<String,MethodHandle> getInstallTargetMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) getOverrideHierarchy(Method method) getScreenIntrospectionData(Class<?> clazz) Introspects screen class and finds annotated fields and methods for dependency injection.getScreenIntrospectionDataNotCached(Class<?> concreteClass) getTargetIntrospectionDataNotCached(Class<?> concreteClass) protected ClassinjectionAnnotation(AnnotatedElement element)
-
Field Details
-
screenIntrospectionCache
protected final com.google.common.cache.LoadingCache<Class<?>,UiControllerReflectionInspector.ScreenIntrospectionData> screenIntrospectionCache -
targetIntrospectionCache
protected final com.google.common.cache.LoadingCache<Class<?>,UiControllerReflectionInspector.TargetIntrospectionData> targetIntrospectionCache -
lambdaMethodsCache
-
lambdaLookupProvider
-
-
Constructor Details
-
UiControllerReflectionInspector
public UiControllerReflectionInspector()
-
-
Method Details
-
getScreenIntrospectionData
public UiControllerReflectionInspector.ScreenIntrospectionData getScreenIntrospectionData(Class<?> clazz) Introspects screen class and finds annotated fields and methods for dependency injection.- Parameters:
clazz- screen class- Returns:
- screen data
-
getAddListenerMethod
-
getInstallTargetMethod
-
getConsumerMethodFactory
public MethodHandle getConsumerMethodFactory(Class<?> ownerClass, UiControllerReflectionInspector.AnnotatedMethod annotatedMethod, Class<?> eventClass) -
getComponentEventListenerMethodFactory
public MethodHandle getComponentEventListenerMethodFactory(Class<?> ownerClass, UiControllerReflectionInspector.AnnotatedMethod annotatedMethod, Class<?> eventClass) -
clearCache
public void clearCache()Clear underlying reflection caches. -
getScreenIntrospectionDataNotCached
protected UiControllerReflectionInspector.ScreenIntrospectionData getScreenIntrospectionDataNotCached(Class<?> concreteClass) -
getTargetIntrospectionDataNotCached
protected UiControllerReflectionInspector.TargetIntrospectionData getTargetIntrospectionDataNotCached(Class<?> concreteClass) -
getAnnotatedInjectElementsNotCached
protected List<UiControllerReflectionInspector.InjectElement> getAnnotatedInjectElementsNotCached(Class<?> clazz) -
getAllFields
-
injectionAnnotation
-
getAnnotatedListenerMethodsNotCached
-
getAnnotatedInstallMethodsNotCached
protected List<UiControllerReflectionInspector.AnnotatedMethod<Install>> getAnnotatedInstallMethodsNotCached(Method[] uniqueDeclaredMethods) -
getAnnotatedSubscribeMethodsNotCached
protected List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> getAnnotatedSubscribeMethodsNotCached(Method[] uniqueDeclaredMethods) -
createAnnotatedMethod
@Nullable protected <A extends Annotation> UiControllerReflectionInspector.AnnotatedMethod<A> createAnnotatedMethod(Class<A> annotationClass, Method method) -
compareSubscribeMethods
protected int compareSubscribeMethods(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1, UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2) -
getDeclaringClass
-
getOverrideHierarchy
-
getAddListenerMethodsNotCached
protected Map<Class,MethodHandle> getAddListenerMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) -
getInstallTargetMethodsNotCached
protected Map<String,MethodHandle> getInstallTargetMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods)
-