public List<String> scanPlugins(ClassLoader classLoader, String path) throws IOException {
final List<String> files = new LinkedList<String>();
scanner.scan(classLoader, path, new ScannerVisitor() {
@Override
public void visit(InputStream file) throws IOException {
ClassFile cf;
try {
DataInputStream dstream = new DataInputStream(file);
cf = new ClassFile(dstream);
} catch (IOException e) {
throw new IOException("Stream not a valid classFile", e);
}
if (hasAnnotation(cf))
files.add(cf.getName());
}
});
return files;
}