How about to add ability to output the generated java class files?

22 views
Skip to first unread message

Wei Liu

unread,
Jul 30, 2012, 11:09:48 PM7/30/12
to loop...@googlegroups.com
It's very helpful to understand the way how loop works, and will be another way to integrate java application.

Cheers,
Leo

Dhanji R. Prasanna

unread,
Jul 31, 2012, 12:52:14 AM7/31/12
to loop...@googlegroups.com
This is fairly easy to do. You can simply call:

Loop.compile("...")

instead of Loop.run() and this will return a class file representing the script. You can also call Loop.implement() to get a loop-backed Java interface that you pass in.

Finally, you can inspect the raw bytecode by setting a system property:

java -jar loop.jar myscript.loop -Dprint_bytecode=true

Is there something else you were after?

Dhanji.

Dhanji R. Prasanna

unread,
Jul 31, 2012, 12:52:33 AM7/31/12
to loop...@googlegroups.com
s/class file/java.lang.class
Reply all
Reply to author
Forward
0 new messages