title: How to dynamically intercept methods in a jar without altering code?
body: <p>I have a jar file containing multiple .class files. Each .class file has several methods in it. Now, while the jar is executing, i.e. during runtime, I want to intercept the methods with an external user defined method. That is, I want to run an external method before or after each method call in my jar classes.</p>
  
  <p>I have looked into Spring-AOP, but it says I need to declare the classes in the Spring context and hence the classes will be called with their methods in the sequence in which it is written in the Spring context. </p>
  
  <p>But I want the execution flow to be that of the original jar webapp. </p>
  
  <p>Can you share with me anything which can be used to achieve what I explained above? Thanks in advance!</p>