public Set<String> call() throws Exception {
Set<String> ret = new HashSet<String>();
final URL _url = translateURL();
if (_url.getProtocol().equals("file")) {
File file = new File(_url.getFile());
IRepositoryParser parser = null;
ZipFile zipFile = null;
try {
if (file.isDirectory()) {
int basePackageLength = StrUtils.parse(barePackageName,
".").length;
for (int i = 0; i < basePackageLength; i++) {
file = file.getParentFile();
}
parser = new DirectoryParser(file);
} else if (file.isFile() && file.getName().endsWith(".jar")) {
zipFile = new ZipFile(file);
parser = new ZipParser(zipFile);
} else {
throw new UnsupportedOperationException(
"Unsupported file: neither directory nor name-ends-with \".jar\"");
}
for (Iterator<IResource> it = parser.iterator(); it
.hasNext();) {
IResource resource = it.next();
if (resource.isDirectory()) {
continue;
}