title: How to trace java method invocations using java reflection?
body: <p>what i have?</p>
  
  <ol>
  <li>A Java class with specific method (say execute()) enforced by interface contracts.</li>
  <li>Inside the execute method, there is a DAO call to respective DAO implementation.</li>
  <li>The DAOImpl uses ORM framework like ibatis to query DB.</li>
  </ol>
  
  <p><b></b></p>
  
  <pre><code>public class Test implements Executable{
  
      public void execute(){
          ...........
          ParentDAO dao = {some utility class that gets me right implementation (ParentDAOImpl) with right data source }
  
          dao.getEmployees({required params});
          ...................
      }
  
  }
  </code></pre>
  
  <p>DAO Implementation class</p>
  
  <pre><code>public class ParentDAOImpl extends SqlMapClientDaoSupport implements ParentDAO {
  
      public void getEmployees({data}) {
          SqlMapClientTemplate template = getSqlMapClientTemplate();
  
          template.queryForObject("getEmployees", data); // assume there is an xml configuration that has "getEmployees" Object
      }
  
  }
  </code></pre>
  
  <p>Also, method name (getEmployees) in DAOImpl and the object name in xml configuration may not be same.</p>
  
  <p>What i am trying to do?</p>
  
  <p>I am trying to come up with an API that tells what is the SQL query or stored procedure 
  that is used behind the screens given the class name ("Test"). How do I it ?</p>