void () { switch (type) { case TYPE_FOLDER -> { // create folder resultSaver.saveFolder(filename); // non-class files for (String[] pair : otherEntries) { resultSaver.copyFile(pair[0], filename, pair[1]); } // classes for (int i = 0; i < classes.size(); i++) { StructClass cl = classes.get(i); if (!cl.isOwn()) { continue; } String entryName = decompiledData.getClassEntryName(cl, classEntries.get(i)); if (entryName != null) { String content = decompiledData.getClassContent(cl); if (content != null) { int[] mapping = null; if (DecompilerContext.getOption(IFernflowerPreferences.BYTECODE_SOURCE_MAPPING)) { mapping = DecompilerContext.getBytecodeSourceMapper().getOriginalLinesMapping(); } resultSaver.saveClassFile(filename, cl.qualifiedName, entryName, content, mapping); } } } } case TYPE_JAR, TYPE_ZIP -> { // create archive file resultSaver.saveFolder(archivePath); resultSaver.createArchive(archivePath, filename, manifest); // directory entries for (String dirEntry : dirEntries) { resultSaver.saveDirEntry(archivePath, filename, dirEntry); } // non-class entries for (String[] pair : otherEntries) { if (type != TYPE_JAR || !JarFile.MANIFEST_NAME.equalsIgnoreCase(pair[1])) { resultSaver.copyEntry(pair[0], archivePath, filename, pair[1]); } } // classes for (int i = 0; i < classes.size(); i++) { StructClass cl = classes.get(i); String entryName = decompiledData.getClassEntryName(cl, classEntries.get(i)); if (entryName != null) { String content = decompiledData.getClassContent(cl); resultSaver.saveClassEntry(archivePath, filename, cl.qualifiedName, entryName, content); } } resultSaver.closeArchive(archivePath, filename); } } }