raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.28k stars 806 forks source link

AST and Code Level Manipulation through JANINO (janino.net) #15

Closed sirinath closed 9 years ago

sirinath commented 9 years ago

Is it possible to extend support in Byte Buddy to manipulate source code / AST through something like Janino with similar interface?

raphw commented 9 years ago

Hi Sinirath,

Byte Buddy is built arround the assumption to manipulate Java byte code at runtime. This assumption is pretty crucial as it for example allows to directly load the manipulated code etc. Also, working with byte code assures that the library remains language agnostic.

Therefore, Byte Buddy has no concept of an AST, it simly provides some glue between precompiled components to wire them together or allows to inject any custom byte code into a class.

Best regards, Rafael