Class ControllerClassPathScanner

java.lang.Object
com.bobocode.bring.web.servlet.scaner.ControllerClassPathScanner
All Implemented Interfaces:
com.bobocode.bring.core.context.scaner.ClassPathScanner

public class ControllerClassPathScanner extends Object implements com.bobocode.bring.core.context.scaner.ClassPathScanner
Implementation of ClassPathScanner that scans for classes annotated with @Controller using Reflections. This scanner uses the Reflections library to scan the classpath and retrieve classes annotated with @Component.
Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Field Details

    • reflections

      private final org.reflections.Reflections reflections
      The Reflections instance used for scanning classes.
  • Constructor Details

    • ControllerClassPathScanner

      public ControllerClassPathScanner()
  • Method Details

    • scan

      public Set<Class<?>> scan()
      Scans the classpath to retrieve classes annotated with @Controller.
      Specified by:
      scan in interface com.bobocode.bring.core.context.scaner.ClassPathScanner
      Returns:
      a set of classes annotated with @Controller
    • getAnnotation

      public Class<? extends Annotation> getAnnotation()
      Specified by:
      getAnnotation in interface com.bobocode.bring.core.context.scaner.ClassPathScanner