Package it.tidalwave.util.spring
Class ClassScanner
java.lang.Object
it.tidalwave.util.spring.ClassScanner
A utility for scanning classes in the classpath with some criteria.
- Author:
- Fabrizio Giudici
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Collection
<Class<?>> Scans for classes and returns them.withAnnotationFilter
(Class<? extends Annotation> annotationClass) Adds a filter for an annotation.withIncludeFilter
(org.springframework.core.type.filter.TypeFilter filter) Adds an "include" filter.
-
Constructor Details
-
ClassScanner
public ClassScanner()
-
-
Method Details
-
findClasses
Scans for classes and returns them.- Returns:
- the collection of scanned classes
-
withIncludeFilter
@Nonnull public ClassScanner withIncludeFilter(@Nonnull org.springframework.core.type.filter.TypeFilter filter) Adds an "include" filter.- Parameters:
filter
- the filter- Returns:
- itself for method chaining
-
withAnnotationFilter
@Nonnull public ClassScanner withAnnotationFilter(@Nonnull Class<? extends Annotation> annotationClass) Adds a filter for an annotation.- Parameters:
annotationClass
- the annotation class- Returns:
- itself for method chaining
-