Interface IApplicationContext

All Known Implementing Classes:
ClassScanner

public interface IApplicationContext
  • Method Details

    • getSubTypesOf

      <T> Set<Class<? extends T>> getSubTypesOf(Class<T> type)
      gets all sub types in hierarchy of a given type

      depends on SubTypesScanner configured

    • getTypesAnnotatedWith

      Set<Class<?>> getTypesAnnotatedWith(Class<? extends Annotation> annotation)
      get types annotated with a given annotation, both classes and annotations

      Inherited is not honored by default.

      when honoring @Inherited, meta-annotation should only effect annotated super classes and its sub types

      Note that this (@Inherited) meta-annotation type has no effect if the annotated type is used for anything other then a class. Also, this meta-annotation causes annotations to be inherited only from superclasses; annotations on implemented interfaces have no effect.

      depends on TypeAnnotationsScanner and SubTypesScanner configured

    • getFieldsAnnotatedWith

      Set<Field> getFieldsAnnotatedWith(Class<? extends Annotation> annotation)
      get all fields annotated with a given annotation

      depends on FieldAnnotationsScanner configured

    • getMethodsAnnotatedWith

      Set<Method> getMethodsAnnotatedWith(Class<? extends Annotation> annotation)
      get all methods annotated with a given annotation

      depends on MethodAnnotationsScanner configured

    • getInstanceOfClass

      Object getInstanceOfClass(Class clazz, Object... params)
      返回class的对象 可以是自身持有对象的单例 没有就new 一个.
      Parameters:
      clazz -
      Returns:
    • isPrepare

      boolean isPrepare(ScannerType scannerType)
      是否有扫描 scannerType
      Parameters:
      scannerType -
      Returns: