title: Get the absolute path of the class file for a method
body: <p>I have a code example, that browse my workspace and picks every method in every class.
  My intention is to print out the absolute path of the method, but I can´t figure out how do to it.</p>
  
  <p>Something like <code>method.getAbsolutePath()</code> is not existed.</p>
  
  <p>My Code:</p>
  
  <pre><code>IPackageFragment[] packages = javaProject.getPackageFragments();
  for (IPackageFragment mypackage : packages) {
      for (ICompilationUnit unit : mypackage.getCompilationUnits()) {
          IType[] allTypes = unit.getAllTypes();
          for (IType type : allTypes) {
              IMethod[] methods = type.getMethods();
              for (IMethod method : methods) {
                  //System.out.println(MyMethodPath);
                  //here is want to print the path
              }
          }
      } 
  }
  </code></pre>
  
  <p>Can someone help?</p>