public static void main(String[] args) throws Exception { File dest = new File(args[0]); ClassWriter cw = new ClassWriter(0); cw.visit(V9, Opcodes.ACC_MODULE, "module-info", null, null, null); ModuleVisitor mv = cw.visitModule("org.joml", 0, args[1]); mv.visitRequire("java.base", ACC_MANDATED, "9"); mv.visitExport("org/joml", 0, (String[]) null); mv.visitExport("org/joml/sampling", 0, (String[]) null); mv.visitEnd(); cw.visitEnd(); FileOutputStream fos = new FileOutputStream(new File(dest, "module-info.class")); fos.write(cw.toByteArray()); fos.close(); }
ModuleVisitor visitModule(String name, int flags, String version);