Is there anyway to override a method at run time? Even if it requires dynamically creating a subclass from that instance?
You could create an anonymous class that overrides the method and uses the strategy pattern to decide what to do.
If you are looking for dynamic compilation from code, you can follow these instructions