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
Answer Checked By - Gilberto Lyons (JavaFixing Admin)