Issue
ByteBuddy provides LoadedTypeInitializer
but it is not persisted in generated bytecode.
Is it possible to generate a static initialisation block?
class Foo { static { /** Added code here **/ } }
Solution
Yes, on the builder:
builder.invokeable(isTypeInitializer()).intercept(...)
This way you can define it just as any static method.
Answered By - Rafael Winterhalter
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.