< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/AsmCodeFactory.java

Print this page




 572         if (owner.pkgName.isEmpty()) {
 573             types.forEach((clsName, bytecodes) -> {
 574                 rv.put(clsName, bytecodes);
 575             });
 576         } else {
 577             types.forEach((clsName, bytecodes) -> {
 578                 rv.put(owner.pkgName + "." + clsName, bytecodes);
 579             });
 580         }
 581         return Collections.unmodifiableMap(rv);
 582     }
 583 
 584     public static void main(String[] args) throws IOException {
 585         final Path file = Paths.get(args[1]);
 586         final String pkg = args[0];
 587         Context ctx = new Context();
 588         ctx.usePackageForFolder(file, pkg);
 589         ctx.usePackageForFolder(Paths.get("/usr/include"), "system");
 590         ctx.addSource(file);
 591         ctx.parse();
 592         ctx.collectJarFile(Paths.get(args[2]), pkg);
 593     }
 594 }


 572         if (owner.pkgName.isEmpty()) {
 573             types.forEach((clsName, bytecodes) -> {
 574                 rv.put(clsName, bytecodes);
 575             });
 576         } else {
 577             types.forEach((clsName, bytecodes) -> {
 578                 rv.put(owner.pkgName + "." + clsName, bytecodes);
 579             });
 580         }
 581         return Collections.unmodifiableMap(rv);
 582     }
 583 
 584     public static void main(String[] args) throws IOException {
 585         final Path file = Paths.get(args[1]);
 586         final String pkg = args[0];
 587         Context ctx = new Context();
 588         ctx.usePackageForFolder(file, pkg);
 589         ctx.usePackageForFolder(Paths.get("/usr/include"), "system");
 590         ctx.addSource(file);
 591         ctx.parse();
 592         ctx.collectJarFile(Paths.get(args[2]), args, pkg);
 593     }
 594 }
< prev index next >