Re: Module descriptor writing example?

Remi Forax <[email protected]> Tue, 20 Mar 2018 16:30:25 +0100 (CET)
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Hi Mark,
something like this should work

    ClassWriter classWriter = new ClassWriter(0);
    classWriter.visit(Opcodes.V9, Opcodes.ACC_MODULE, "module-info", null, null, null);
    moduleNode.accept(classWriter);
    classWriter.visitEnd();

cheers,
Rémi

----- Mail original -----
> De: "Mark Raynsford" <[email protected]>
> À: "asm" <[email protected]>
> Envoyé: Mardi 20 Mars 2018 16:04:02
> Objet: [asm] Module descriptor writing example?

> Hello!
> 
> Does anyone have any example code that shows how to serialize a simple
> module descriptor?
> 
> I have a populated ModuleNode with a name and a few requires/exports,
> but I can't work out how to transform that to valid bytecode via a
> ClassWriter.
> 
> --
> Mark Raynsford | http://www.io7m.com


-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws