Java 类org.objectweb.asm.ModuleVisitor 实例源码

项目:JOML    文件:ModuleInfoGenerator.java   
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();
}
项目:moduletools    文件:JavacModuleParser.java   
ModuleVisitor visitModule(String name, int flags, String version);
项目:pro    文件:ModuleClassVisitor.java   
ModuleVisitor visitModule(String name, int flags, String version);