Class ClassScanner

java.lang.Object
it.tidalwave.util.spring.ClassScanner

public class ClassScanner extends Object
A utility for scanning classes in the classpath with some criteria.
Author:
Fabrizio Giudici
  • Constructor Details

    • ClassScanner

      public ClassScanner()
  • Method Details

    • findClasses

      @Nonnull public final Collection<Class<?>> 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