title: Soot - Map from java class to jimple
body: <p>With the following code I can get the <code>jimple</code> representation of a java <code>.class</code> file:</p>
  <pre class="lang-java prettyprint-override"><code>        soot.Main.main(args);
          SootClass mainClass = Scene.v().getMainClass();
          String methodSignature = &quot;void main(java.lang.String[])&quot;;
          SootMethod mainMethod = mainClass.getMethod(methodSignature);
          Body jimpleBody = mainMethod.retrieveActiveBody();
  </code></pre>
  <p>However, I need to know the map from <code>.class</code> to <code>jimple</code>. In detail, For a certain line of code in the <code>.class</code> file, I want to know its corresponding <code>jimple</code> representation. Since one line of code can be converted into multiple <code>jimple</code> codes, this map can be one-to-many. Does there exist any API or method that can solve this problem?</p>