AnnotationDB db = new AnnotationDB(); db.scanArchives(new File("path/to/classes")); db.scan(); Set<String> annotatedClasses = db.getAnnotationIndex().get("com.example.MyAnnotation");