Im trying to change the method of just one instance from another class. Is this possible, and if so how can I do it?
Im trying to rewrite the entire method durring runtime. I only want the method to be changed for one instance of the class, and all the other instance’s methods should stay the same. I hope that clears up some confusion
No this is not possible.
Method definitions are stored by class, not instance (and are immutable anyway). One thing you can do is to store a callable object per instance and call that.