raphw / byte-buddy

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

why is the byte-buudy AgentBuilder source code so long ? #1596

Closed jiangyunpeng closed 7 months ago

jiangyunpeng commented 7 months ago

No offense meant , why is the byte-buudy AgentBuilder source code so long ? it's 12000+ line. Is there any special reason for it?

raphw commented 7 months ago

It's because Byte Buddy uses nested classes for additional expressiveness. This way, it is AgentBuilder.Default, for example instead of DefaultAgentBuilder. This allows your IDE to give you additional help.

jiangyunpeng commented 7 months ago

thanks