I don\'t want to discuss the merits of this approach, just if it is possible. I believe the answer to be \"no\". But maybe someone will surprise me!
Imagine you have
It is totally possible to monkeypatch in Java, using Unsafe.putObject and a class finder. Wrote a blog post here:
https://tersesystems.com/blog/2014/03/02/monkeypatching-java-classes/