I would like to bind some instance of the object to a class created using Javassist. This object is read from some source, data is not known in advance.
But when I checked the API, it seems that the Javassist is creating real bytecode that stores the initialization in terms of “call it” or “instantiate it” or “use this constant”.
Is there a way to ask Javassist to add a static field initialized by an existing instance specified at runtime?
source share