Examples located on the ByteBuddy website use anonymous object invocation (new ByteBuddy().subclass(Foo.class)) rather than assigning the ByteBuddy object to a field. Is this the recommended use for ByteBuddy, or should I assign the object to a field if I plan on creating many class builders?
I have an application that generates hundreds of dynamic classes. I was not sure if there would be any repercussions to using the same ByteBuddy object, or should I create a new object ByteBuddy object with each new class?
Everything in Byte Buddy is immutable and can be reused. Creating the instances is rather cheap, though, but it's up to you!
Examples located on the ByteBuddy website use anonymous object invocation (new ByteBuddy().subclass(Foo.class)) rather than assigning the ByteBuddy object to a field. Is this the recommended use for ByteBuddy, or should I assign the object to a field if I plan on creating many class builders?
I have an application that generates hundreds of dynamic classes. I was not sure if there would be any repercussions to using the same ByteBuddy object, or should I create a new object ByteBuddy object with each new class?
--
You received this message because you are subscribed to the Google Groups "Byte Buddy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to byte-buddy+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/byte-buddy/237119f3-9324-4074-b7e7-b33a2490d420n%40googlegroups.com.