Replace/override method of an object which is an implementation of an interface in Java
<p>I have an interface which has only one method. I have a static function which receives objects (these objects implement the interface), and I want to override/replace implementation of the method, that is defined in the interface, in objects. What is the best way to do this in Java</p>

<pre><code>public class MyClass {

    public interface MyInterface {
         Object myMethod (Object blah);
    }

    public static MyInterface decorator(MyInterface obj) { 
          //I want to return a version of obj
          //with a different implementation of myMethod
          //everything else in obj should be same, except myMethod 
    } 
}
</code></pre>
