Interface ClassFinder
- All Superinterfaces:
Implementation.ExtensionProvidable
- All Known Implementing Classes:
ReflectiveClassFinder
ClassFinders search for classes annotated with a specific annotation-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassFinderThis provides an array backed implementation ofClassFinderthat just returns the explicitly stated classes.static ClassFinderreflective(String... packages) This provides a reflections based implementation ofClassFindersearch(Class<? extends Annotation> annotationClass) This method searches for classes annotated with the given annotation.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.
-
Method Details
-
reflective
This provides a reflections based implementation ofClassFinder- Parameters:
packages- a list of packages that should be scanned
-
explicit
This provides an array backed implementation ofClassFinderthat just returns the explicitly stated classes.- Parameters:
classes- the classes to be scanned
-
search
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 annotationsuperType- theClass, which is a supertype of the found classes- Returns:
- the found classes
-