Class ReflectionUtils

java.lang.Object
io.activej.inject.util.ReflectionUtils

public final class ReflectionUtils extends Object
These are various reflection utilities that are used by the DSL. While you should not use them normally, they are pretty well organized and thus are left public.
  • Constructor Details

    • ReflectionUtils

      public ReflectionUtils()
  • Method Details

    • getDisplayName

      public static String getDisplayName(Type type)
    • getShortName

      public static String getShortName(Type type)
    • getOuterClassInstance

      @Nullable public static @Nullable Object getOuterClassInstance(Object innerClassInstance)
    • qualifierOf

      @Nullable public static @Nullable Object qualifierOf(AnnotatedElement annotatedElement)
    • keyOf

      public static <T> Key<T> keyOf(@Nullable @Nullable Type container, Type type, AnnotatedElement annotatedElement)
    • getScope

      public static Scope[] getScope(AnnotatedElement annotatedElement)
    • getAnnotatedElements

      public static <T extends AnnotatedElement & Member> List<T> getAnnotatedElements(Class<?> cls, Class<? extends Annotation> annotationType, Function<Class<?>,T[]> extractor, boolean allowStatic)
    • generateImplicitBinding

      @Nullable public static <T> @Nullable Binding<T> generateImplicitBinding(Key<T> key)
    • generateConstructorBinding

      @Nullable public static <T> @Nullable Binding<T> generateConstructorBinding(Key<T> key)
    • generateInjectingInitializer

      public static <T> BindingInitializer<T> generateInjectingInitializer(Key<T> container)
    • fieldInjector

      public static <T> BindingInitializer<T> fieldInjector(Key<T> container, Field field)
    • methodInjector

      public static <T> BindingInitializer<T> methodInjector(Key<T> container, Method method)
    • toDependencies

      public static Key<?>[] toDependencies(@Nullable @Nullable Type container, Executable executable)
    • bindingFromMethod

      public static <T> Binding<T> bindingFromMethod(@Nullable @Nullable Object module, Method method)
    • bindingFromConstructor

      public static <T> Binding<T> bindingFromConstructor(Key<T> key, Constructor<T> constructor)
    • scanClass

      public static Module scanClass(Class<?> moduleClass, @Nullable @Nullable Object module)
    • scanClassInto

      public static Module scanClassInto(Class<?> moduleClass, @Nullable @Nullable Object module, ModuleBuilder builder)
    • scanClassHierarchy

      public static Map<Class<?>,Module> scanClassHierarchy(Class<?> moduleClass, @Nullable @Nullable Object module)