Interface ClassFinder

All Superinterfaces:
Implementation.ExtensionProvidable
All Known Implementing Classes:
ReflectiveClassFinder

public non-sealed interface ClassFinder extends Implementation.ExtensionProvidable
ClassFinders search for classes annotated with a specific annotation
  • Method Details

    • reflective

      static ClassFinder reflective(String... packages)
      This provides a reflections based implementation of ClassFinder
      Parameters:
      packages - a list of packages that should be scanned
    • explicit

      static ClassFinder explicit(Class<?>... classes)
      This provides an array backed implementation of ClassFinder that just returns the explicitly stated classes.
      Parameters:
      classes - the classes to be scanned
    • search

      SequencedCollection<Class<?>> search(Class<? extends Annotation> annotationClass)
      This method searches for classes annotated with the given annotation.
      Parameters:
      annotationClass - the class of the annotation
      Returns:
      the found classes
    • search

      default <T> SequencedCollection<Class<T>> search(Class<? extends Annotation> annotationClass, Class<T> superType)
      This method searches for classes annotated with the given annotation, which have the given super type.
      Parameters:
      annotationClass - the class of the annotation
      superType - the Class, which is a supertype of the found classes
      Returns:
      the found classes