use of org.eclipse.ceylon.langtools.classfile.ClassWriter in project ceylon by eclipse.
the class Java9Util method writeModuleDescriptor.
private static void writeModuleDescriptor(ZipOutputStream zos, Java9ModuleDescriptor module) {
ClassWriter classWriter = new ClassWriter();
ClassFile classFile = generateModuleDescriptor(module);
try {
zos.putNextEntry(new ZipEntry("module-info.class"));
classWriter.write(classFile, zos);
zos.flush();
zos.closeEntry();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
use of org.eclipse.ceylon.langtools.classfile.ClassWriter in project ceylon by eclipse.
the class Java9Util method writeModuleDescriptor.
public static void writeModuleDescriptor(File outputFolder, Java9ModuleDescriptor module) {
ClassWriter classWriter = new ClassWriter();
ClassFile classFile = generateModuleDescriptor(module);
try (OutputStream os = new FileOutputStream(new File(outputFolder, "module-info.class"))) {
classWriter.write(classFile, os);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
Aggregations