Package io.jmix.ui.sys
Class UiControllerReflectionInspector
java.lang.Object
io.jmix.ui.sys.UiControllerReflectionInspector
@Component("ui_UiControllerReflectionInspector")
public class UiControllerReflectionInspector
extends Object
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear underlying reflection caches.protected int
compareSubscribeMethods
(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1, UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2) getAddListenerMethod
(Class<?> clazz, Class<?> eventType) protected Map<Class,
MethodHandle> getAddListenerMethodsNotCached
(Class<?> clazz, Method[] uniqueDeclaredMethods) getAllFields
(List<Class<?>> classes) getAnnotatedInjectElements
(Class<?> clazz) getAnnotatedInjectElementsNotCached
(Class<?> clazz) getAnnotatedInstallMethods
(Class<?> clazz) getAnnotatedInstallMethodsNotCached
(Class<?> clazz, Method[] uniqueDeclaredMethods) getAnnotatedListenerMethods
(Class<?> clazz) getAnnotatedListenerMethodsNotCached
(Class<?> clazz, Method[] uniqueDeclaredMethods) getAnnotatedSubscribeMethods
(Class<?> clazz) getAnnotatedSubscribeMethodsNotCached
(Class<?> clazz, Method[] uniqueDeclaredMethods) 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) getPropertySetters
(Class<?> clazz) getPropertySettersNotCached
(Method[] methods) getScreenIntrospectionData
(Class<?> clazz) Introspects screen class and finds annotated fields and methods for dependency injection.getScreenIntrospectionDataNotCached
(Class<?> concreteClass) getTargetIntrospectionDataNotCached
(Class<?> concreteClass) protected Class
injectionAnnotation
(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
-
getAnnotatedInstallMethods
public List<UiControllerReflectionInspector.AnnotatedMethod<Install>> getAnnotatedInstallMethods(Class<?> clazz) -
getAnnotatedSubscribeMethods
public List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> getAnnotatedSubscribeMethods(Class<?> clazz) -
getAnnotatedListenerMethods
-
getAnnotatedInjectElements
public List<UiControllerReflectionInspector.InjectElement> getAnnotatedInjectElements(Class<?> clazz) -
getPropertySetters
-
getAddListenerMethod
-
getInstallTargetMethod
-
getConsumerMethodFactory
public MethodHandle getConsumerMethodFactory(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
-
getPropertySettersNotCached
-
getAnnotatedListenerMethodsNotCached
-
getAnnotatedInstallMethodsNotCached
protected List<UiControllerReflectionInspector.AnnotatedMethod<Install>> getAnnotatedInstallMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) -
getAnnotatedSubscribeMethodsNotCached
protected List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> getAnnotatedSubscribeMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) -
getAddListenerMethodsNotCached
protected Map<Class,MethodHandle> getAddListenerMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods) -
compareSubscribeMethods
protected int compareSubscribeMethods(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1, UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2) -
getDeclaringClass
-
getOverrideHierarchy
-
getInstallTargetMethodsNotCached
protected Map<String,MethodHandle> getInstallTargetMethodsNotCached(Class<?> clazz, Method[] uniqueDeclaredMethods)
-