Live data from Hacker News

Byte Buddy is a code generation and manipulation library for Java

bytebuddy.net

1–10 of 52 posts

Re: Byte Buddy is a code generation and manipulation library for Java

#4
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

for those who might be clicking through thinking "since when??", the emphasis is on "now" - this was released in JDK 24.

bytebuddy predates it by at least a decade.

Re: Byte Buddy is a code generation and manipulation library for Java

#6
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

for those who might be clicking through thinking "since when??", the emphasis is on "now" - this was released in JDK 24. bytebuddy predates it by at least a decade.

Hence the now on my comment. :)

Re: Byte Buddy is a code generation and manipulation library for Java

#7
post #5
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

How does that compare in terms of usability and completeness?

It's complete but low level compared to Byte Buddy. A better comparison is the to ASM (which is what it was meant to replace).

https://asm.ow2.io/

Re: Byte Buddy is a code generation and manipulation library for Java

#9
post #5
post #3

Note that Java now has its own API for this purpose. https://openjdk.org/jeps/484

How does that compare in terms of usability and completeness?

I have not yet used it, only raising awareness.

This came to be, because Oracle noticed everyone, including themselves, were depending on ASM, so the JEP was born.

Re: Byte Buddy is a code generation and manipulation library for Java

#10
post #9
post #5

Earlier quoted context omitted.

How does that compare in terms of usability and completeness?

I have not yet used it, only raising awareness. This came to be, because Oracle noticed everyone, including themselves, were depending on ASM, so the JEP was born.

Yup, the ASM dependency is one that would constantly cause us headaches. A load of frameworks have a path to ASM for one reason or another and it requires an update every time you move up JVM runtimes.

It's usually not painful to update (just bump the version) but it's an annoyance.

In fact, Byte buddy has a dep on ASM.

Post reply on HN