title: Iterating through method parameters
body: <p>It's a simple and maybe trivial question: in Java how can I iterate through the parameters passed to the method where I'm working?</p>
  
  <p>I need it to <code>trim()</code> all of them that are strings.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>To be more precise</strong> an example of use can be this (written in a pseudo-code reflecting how I wish it to work):</p>
  
  <pre><code>public void methodName(String arg1, int arg2, int arg3, String arg4, double arg5)
      for(Object obj : getThisMethod().getParameters() )
          System.out.println(obj.getName() + " = " + obj.toString())
  </code></pre>
  
  <p>The point is that <code>getThisMethod().getParameters()</code>. What must I write in that place?</p>