Class ServiceClassPathScanner
java.lang.Object
com.bobocode.bring.core.context.scaner.impl.ServiceClassPathScanner
- All Implemented Interfaces:
ClassPathScanner
Implementation of ClassPathScanner that scans for classes annotated with @Service 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends Annotation> Retrieves the annotation type scanned by this class path scanner.scan()
Scans the classpath to retrieve classes annotated with @Service.
-
Field Details
-
reflections
private final org.reflections.Reflections reflections
-
-
Constructor Details
-
ServiceClassPathScanner
public ServiceClassPathScanner()
-
-
Method Details
-
scan
Scans the classpath to retrieve classes annotated with @Service.- Specified by:
scan
in interfaceClassPathScanner
- Returns:
- a set of classes annotated with @Service
-
getAnnotation
Retrieves the annotation type scanned by this class path scanner.- Specified by:
getAnnotation
in interfaceClassPathScanner
- Returns:
- The Class object representing the annotation scanned by this class path scanner.
-