title: How to modify a Java bytecode using ASM 4.0
body: <p>I am new to ASM framework. I have been working around this ASM framework for a week. I saw tutorials in net regarding parsing a class and Generating a .class file from scratch.
  But am unable to follow how to modify a existing class in ASM.</p>
  
  <p>I am unable to follow the flow of execution between the <code>ClassVisitor</code>, <code>ClassWriter</code> and <code>ClassReader</code>.</p>
  
  <p>Kindly solve my issue by giving me a ASM example for the following code.</p>
  
  <pre><code>public class ClassName {
    public void showOne() {
      System.out.println("Show One Method");
    }
  
    public static void main(String[] args) {
      ClassName c = new ClassName();
      c.showOne();
    }
  }
  </code></pre>
  
  <p>The above class should be modified as:   </p>
  
  <pre><code>public class ClassName {
    public void showOne() {
      System.out.println("Show One Method");
    }
  
    public void showTwo() { // &lt;- Newly added method
      System.out.println("Show Two Method");
    }
  
    public static void main(String[] args) {
      ClassName c = new ClassName();
      c.showOne();
      c.showTwo(); // &lt;- Newly inserted method call
    }
  }
  </code></pre>
  
  <p>What should be the ASM code to modify it?</p>
  
  <p>I used the ASMifier tool to generate the code. But I don't know where to apply it.</p>