Package org.hotswap.agent.util.scanner
Class ClassPathAnnotationScanner
- java.lang.Object
-
- org.hotswap.agent.util.scanner.ClassPathAnnotationScanner
-
public class ClassPathAnnotationScanner extends Object
Scan a directory for annotation returning class names.- Author:
- Jiri Bubnik
-
-
Constructor Summary
Constructors Constructor Description ClassPathAnnotationScanner(String annotation, Scanner scanner)Create scanner for the annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanhasAnnotation(ClassFile cf)Check if the file contains annotation.List<String>scanPlugins(ClassLoader classLoader, String path)Run the scan - search path for files containing annotation.
-
-
-
Method Detail
-
scanPlugins
public List<String> scanPlugins(ClassLoader classLoader, String path) throws IOException
Run the scan - search path for files containing annotation.- Parameters:
classLoader- classloader to resolve pathpath- path to scanScanner.scan(ClassLoader, String, ScannerVisitor)- Returns:
- list of class names containing the annotation
- Throws:
IOException- scan exception.
-
hasAnnotation
protected boolean hasAnnotation(ClassFile cf) throws IOException
Check if the file contains annotation.- Throws:
IOException
-
-