title: Run a method before and after a called method in Java
body: <p>I'm trying to write a Java program such that after calling a <em>methodA()</em>, first a method named <em>methodBeforeA()</em> is called and then <em>methodA()</em> gets executed followed by another method being called named, <em>methodAfterA()</em>. This is very similar to what Junit does using Annotations (using the @Before, @Test, @After), so i think it should be possible using reflection but i don't have a very good clue. </p>