title: How can I run a method after return?
body: <p>I am trying to run a method after returning data in a set of code.</p>
  
  <p>If I put it below the return, it will become unreachable code. If I put in above, I am not able to extract data out of it since it will only insert the data into SQL after the return method.</p>
  
  <p>I am using an open source James Email Server to do this.</p>
  
  <p>So for example.. the code is like this..</p>
  
  <pre><code>public class testList
    extends GenericMatcher
  {
      public Collection test(Mail mail) {
      /*All the processing of the mail datas and checks will be done here.. 
      after which, return mail.getRecipients(); at the end will send 
      the result back to.. I dont know where? This return will then 
      insert it into the SQL table. So I would like to move this data 
      from that SQL table to another SQL table that is why I      
      need to access only after the return method.*/
          if (test.contains(test1)) {
              return mail.getRecipients();
              //call other method here
          } else {
              return null;
          }
      }
  }
  </code></pre>
  
  <p>So is there a way for me to call the method or do some more data processing after the return method? I have no idea where does the return method go to too.</p>
  
  <p><a href="http://imgur.com/Klru3Jl" rel="nofollow">http://imgur.com/Klru3Jl</a></p>