title: Listener on Method.invoke java
body: <p><br> Hi, everyone.<br>
  I want to add a listener on an invoked method by calling like this :</p>
  
  <pre><code>myClass.myMethod(...);
  </code></pre>
  
  <p>In runtime, it will be something like : </p>
  
  <pre><code>listenerClass.beforeMethod(...);
  myClass.myMethod(...); 
  listenerClass.beforeMethod(...);
  </code></pre>
  
  <p>I wanted to override <code>Method.invoke(...)</code> : </p>
  
  <pre><code>public Object invoke(Object obj, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
      doBefore(...);
      super.invoke(...);
      doAfter(...);
  }
  </code></pre>
  
  <p>Class.java and Method.java are final and I tried with my own ClassLoader.
  Perhaps a factory or annotation can do the work.
  Thanks for your answer.</p>