use of org.eclipse.ceylon.langtools.classfile.Descriptor.InvalidDescriptor in project ceylon by eclipse.
the class ClassFileScanner method scan.
public void scan(ModuleInfo moduleInfo) throws IOException {
PathFilter pathFilter = null;
if (moduleInfo != null && moduleInfo.getFilter() != null) {
pathFilter = PathFilterParser.parse(moduleInfo.getFilter());
}
try (ZipFile zf = new ZipFile(jarFile)) {
Enumeration<? extends ZipEntry> entries = zf.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
if (entry.isDirectory() || !entry.getName().toLowerCase().endsWith(".class"))
continue;
if (pathFilter != null && !pathFilter.accept(entry.getName()))
continue;
try (InputStream is = zf.getInputStream(entry)) {
try {
ClassFile classFile = ClassFile.read(is);
isPublicApi = false;
checkPublicApi(classFile);
} catch (ConstantPoolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidDescriptor e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
Aggregations