Class ClassPathAnnotationScanner
java.lang.Object
io.micronaut.ast.groovy.scan.ClassPathAnnotationScanner
- All Implemented Interfaces:
AnnotationScanner
An optimized classpath scanner that includes the ability to optionally scan JAR files.
The implementation avoids loading the classes themselves by parsing the class definitions and reading only the annotations.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassPathAnnotationScannerincludeJars(boolean includeJars) Whether to include JAR files.Scan the given packages.protected voidprotected voidtraverseFile(String annotation, List<Class<?>> classes, Path filePath)
-
Constructor Details
-
ClassPathAnnotationScanner
- Parameters:
classLoader- The class loader
-
ClassPathAnnotationScanner
public ClassPathAnnotationScanner()Default constructor.
-
-
Method Details
-
includeJars
Whether to include JAR files.- Parameters:
includeJars- The jar files to include- Returns:
- This scanner
-
scan
-
doScan
-
traverseFile
-
scanFile
-