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 Summary
Modifier and TypeFieldDescriptionprivate final org.reflections.Reflections
The Reflections instance used for scanning classes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends Annotation> scan()
Scans the classpath to retrieve classes annotated with @Controller.
-
Field Details
-
reflections
private final org.reflections.Reflections reflectionsThe Reflections instance used for scanning classes.
-
-
Constructor Details
-
ControllerClassPathScanner
public ControllerClassPathScanner()
-
-
Method Details
-
scan
Scans the classpath to retrieve classes annotated with @Controller.- Specified by:
scan
in interfacecom.bobocode.bring.core.context.scaner.ClassPathScanner
- Returns:
- a set of classes annotated with @Controller
-
getAnnotation
- Specified by:
getAnnotation
in interfacecom.bobocode.bring.core.context.scaner.ClassPathScanner
-