@Component(value="cuba_UiControllerReflectionInspector")
public class UiControllerReflectionInspector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UiControllerReflectionInspector.AnnotatedMethod<T> |
static class |
UiControllerReflectionInspector.InjectElement |
static class |
UiControllerReflectionInspector.ScreenIntrospectionData |
static class |
UiControllerReflectionInspector.TargetIntrospectionData |
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Function<java.lang.Class,java.lang.invoke.MethodHandles.Lookup> |
lambdaLookupProvider |
protected com.google.common.cache.Cache<java.lang.invoke.MethodHandle,java.lang.invoke.MethodHandle> |
lambdaMethodsCache |
protected com.google.common.cache.LoadingCache<java.lang.Class<?>,UiControllerReflectionInspector.ScreenIntrospectionData> |
screenIntrospectionCache |
protected com.google.common.cache.LoadingCache<java.lang.Class<?>,UiControllerReflectionInspector.TargetIntrospectionData> |
targetIntrospectionCache |
Constructor and Description |
---|
UiControllerReflectionInspector() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clear underlying reflection caches.
|
protected int |
compareSubscribeMethods(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1,
UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2) |
java.lang.invoke.MethodHandle |
getAddListenerMethod(java.lang.Class<?> clazz,
java.lang.Class<?> eventType) |
protected java.util.Map<java.lang.Class,java.lang.invoke.MethodHandle> |
getAddListenerMethodsNotCached(java.lang.Class<?> clazz,
java.lang.reflect.Method[] uniqueDeclaredMethods) |
protected java.util.List<java.lang.reflect.Field> |
getAllFields(java.util.List<java.lang.Class<?>> classes) |
java.util.List<UiControllerReflectionInspector.InjectElement> |
getAnnotatedInjectElements(java.lang.Class<?> clazz) |
protected java.util.List<UiControllerReflectionInspector.InjectElement> |
getAnnotatedInjectElementsNotCached(java.lang.Class<?> clazz) |
java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Install>> |
getAnnotatedInstallMethods(java.lang.Class<?> clazz) |
protected java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Install>> |
getAnnotatedInstallMethodsNotCached(java.lang.Class<?> clazz,
java.lang.reflect.Method[] uniqueDeclaredMethods) |
java.util.List<java.lang.reflect.Method> |
getAnnotatedListenerMethods(java.lang.Class<?> clazz) |
protected java.util.List<java.lang.reflect.Method> |
getAnnotatedListenerMethodsNotCached(java.lang.Class<?> clazz,
java.lang.reflect.Method[] uniqueDeclaredMethods) |
java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> |
getAnnotatedSubscribeMethods(java.lang.Class<?> clazz) |
protected java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> |
getAnnotatedSubscribeMethodsNotCached(java.lang.Class<?> clazz,
java.lang.reflect.Method[] uniqueDeclaredMethods) |
java.lang.invoke.MethodHandle |
getConsumerMethodFactory(java.lang.Class<?> ownerClass,
UiControllerReflectionInspector.AnnotatedMethod annotatedMethod,
java.lang.Class<?> eventClass) |
protected java.lang.Class<?> |
getDeclaringClass(java.lang.reflect.Method method) |
java.lang.invoke.MethodHandle |
getInstallTargetMethod(java.lang.Class<?> clazz,
java.lang.String methodName) |
protected java.util.Map<java.lang.String,java.lang.invoke.MethodHandle> |
getInstallTargetMethodsNotCached(java.lang.Class<?> clazz,
java.lang.reflect.Method[] uniqueDeclaredMethods) |
protected java.util.Set<java.lang.reflect.Method> |
getOverrideHierarchy(java.lang.reflect.Method method) |
java.util.List<java.lang.reflect.Method> |
getPropertySetters(java.lang.Class<?> clazz) |
protected java.util.List<java.lang.reflect.Method> |
getPropertySettersNotCached(java.lang.reflect.Method[] methods) |
UiControllerReflectionInspector.ScreenIntrospectionData |
getScreenIntrospectionData(java.lang.Class<?> clazz)
Introspects screen class and finds annotated fields and methods for dependency injection.
|
protected UiControllerReflectionInspector.ScreenIntrospectionData |
getScreenIntrospectionDataNotCached(java.lang.Class<?> concreteClass) |
protected UiControllerReflectionInspector.TargetIntrospectionData |
getTargetIntrospectionDataNotCached(java.lang.Class<?> concreteClass) |
protected java.lang.Class |
injectionAnnotation(java.lang.reflect.AnnotatedElement element) |
protected final com.google.common.cache.LoadingCache<java.lang.Class<?>,UiControllerReflectionInspector.ScreenIntrospectionData> screenIntrospectionCache
protected final com.google.common.cache.LoadingCache<java.lang.Class<?>,UiControllerReflectionInspector.TargetIntrospectionData> targetIntrospectionCache
protected final com.google.common.cache.Cache<java.lang.invoke.MethodHandle,java.lang.invoke.MethodHandle> lambdaMethodsCache
protected final java.util.function.Function<java.lang.Class,java.lang.invoke.MethodHandles.Lookup> lambdaLookupProvider
public UiControllerReflectionInspector.ScreenIntrospectionData getScreenIntrospectionData(java.lang.Class<?> clazz)
clazz
- screen classpublic java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Install>> getAnnotatedInstallMethods(java.lang.Class<?> clazz)
public java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> getAnnotatedSubscribeMethods(java.lang.Class<?> clazz)
public java.util.List<java.lang.reflect.Method> getAnnotatedListenerMethods(java.lang.Class<?> clazz)
public java.util.List<UiControllerReflectionInspector.InjectElement> getAnnotatedInjectElements(java.lang.Class<?> clazz)
public java.util.List<java.lang.reflect.Method> getPropertySetters(java.lang.Class<?> clazz)
@Nullable public java.lang.invoke.MethodHandle getAddListenerMethod(java.lang.Class<?> clazz, java.lang.Class<?> eventType)
@Nullable public java.lang.invoke.MethodHandle getInstallTargetMethod(java.lang.Class<?> clazz, java.lang.String methodName)
public java.lang.invoke.MethodHandle getConsumerMethodFactory(java.lang.Class<?> ownerClass, UiControllerReflectionInspector.AnnotatedMethod annotatedMethod, java.lang.Class<?> eventClass)
public void clearCache()
protected UiControllerReflectionInspector.ScreenIntrospectionData getScreenIntrospectionDataNotCached(java.lang.Class<?> concreteClass)
protected UiControllerReflectionInspector.TargetIntrospectionData getTargetIntrospectionDataNotCached(java.lang.Class<?> concreteClass)
protected java.util.List<UiControllerReflectionInspector.InjectElement> getAnnotatedInjectElementsNotCached(java.lang.Class<?> clazz)
protected java.util.List<java.lang.reflect.Field> getAllFields(java.util.List<java.lang.Class<?>> classes)
protected java.lang.Class injectionAnnotation(java.lang.reflect.AnnotatedElement element)
protected java.util.List<java.lang.reflect.Method> getPropertySettersNotCached(java.lang.reflect.Method[] methods)
protected java.util.List<java.lang.reflect.Method> getAnnotatedListenerMethodsNotCached(java.lang.Class<?> clazz, java.lang.reflect.Method[] uniqueDeclaredMethods)
protected java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Install>> getAnnotatedInstallMethodsNotCached(java.lang.Class<?> clazz, java.lang.reflect.Method[] uniqueDeclaredMethods)
protected java.util.List<UiControllerReflectionInspector.AnnotatedMethod<Subscribe>> getAnnotatedSubscribeMethodsNotCached(java.lang.Class<?> clazz, java.lang.reflect.Method[] uniqueDeclaredMethods)
protected java.util.Map<java.lang.Class,java.lang.invoke.MethodHandle> getAddListenerMethodsNotCached(java.lang.Class<?> clazz, java.lang.reflect.Method[] uniqueDeclaredMethods)
protected int compareSubscribeMethods(UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am1, UiControllerReflectionInspector.AnnotatedMethod<Subscribe> am2)
protected java.lang.Class<?> getDeclaringClass(java.lang.reflect.Method method)
protected java.util.Set<java.lang.reflect.Method> getOverrideHierarchy(java.lang.reflect.Method method)
protected java.util.Map<java.lang.String,java.lang.invoke.MethodHandle> getInstallTargetMethodsNotCached(java.lang.Class<?> clazz, java.lang.reflect.Method[] uniqueDeclaredMethods)