vendredi 7 avril 2017

Modify field in class during runtime - java

My question is, is it possible to inject properties or even methods into a already "classloaded" class. I already noticed, that in java it is not really simple to add properties dynamically and everyone says that you should use a Map (add property for a object dynamicly).

Is there any better and "cleaner" way to change a class during runtime. I read something about ASM, but i do not know if the visitor pattern, which is use by ASM, is the optimal way to work with.

In case ASM is the best thing to handle this problem, is there any documentation beside the one provided on the ASM Website (http://ift.tt/1jsr205)

I have not so much knowledge in ASM, because I am just starting to learn it.

Thanks

Diego Krupitza





Aucun commentaire:

Enregistrer un commentaire