Class AnnotationScanner
java.lang.Object
com.arc_e_tect.gradle.jacoco.scan.AnnotationScanner
Parses a single Java source file and collects every element that carries
the configured exclusion annotation.
Handles classes, constructors, methods, and fields, including in nested classes. Anonymous classes are ignored because they cannot bear annotations on their declaration.
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationScanner(String annotationSimpleName) Creates a scanner that looks for the given annotation. -
Method Summary
Modifier and TypeMethodDescriptionScans one.javasource file and returns every annotated element.
-
Constructor Details
-
AnnotationScanner
Creates a scanner that looks for the given annotation.- Parameters:
annotationSimpleName- simple (unqualified) name of the exclusion annotation
-
-
Method Details
-
scan
Scans one.javasource file and returns every annotated element.- Parameters:
sourceFile- the file to parse- Returns:
- possibly-empty list of excluded elements, never
null - Throws:
IOException- if the file cannot be read
-