@Override
public Collection<BundleFile> findNestedBundles(File tmpDir) throws IOException {
URL base = new URL("jar:" + new File(jarFile.getName()).toURI().toURL().toExternalForm() + "!/");
String fileName = getFileName();
Enumeration<JarEntry> entries = jarFile.entries();
List<BundleFile> nested = new ArrayList<>();
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
String path = entry.getName();
if (entry.getName().endsWith(".jar")) {
String location = base + path;
String name = path.replace('/', '_');
File dest = new File(tmpDir, fileName + '-' + name);
extractNestedJar(jarFile, entry, dest);
nested.add(new NestedJarBundleFile(location, dest));
}
}
return nested;
}