title: annotation Transformer Invocation
body: <p>I would like to use annotation transformer in my code, after reading the reference. I am still not fully understand how to invoke annotation transformer to my orignal code programmatically(I read it before <a href="http://testng.org/doc/documentation-main.html" rel="nofollow">http://testng.org/doc/documentation-main.html</a>). Suppose I have the following code:</p>
  
  <pre><code>import java.lang.reflect.Constructor;
  import java.lang.reflect.Method;
  
  import org.testng.IAnnotationTransformer;
  import org.testng.annotations.ITestAnnotation;
  import org.testng.annotations.Test;
  
  
  
  public class TestNGTest {
  
     @Test(dependsOnMethods = { "testCase2" })
     public void testCase1() {
        System.out.println("in test case 1");
     }
  
     @Test
     public void testCase2() {
        System.out.println("in test case 2");
     }
  
  
  
     public static class MyTransformer implements IAnnotationTransformer {
  
          @Override
          public void transform(final ITestAnnotation annotation, final Class testClass,
                  final Constructor testConstructor, final Method testMethod) {
             //some transformations of my annotation
          }
  
  
     }
  }
  </code></pre>
  
  <p>How can I invoke "transform" programmatically?
  Thank you very much for you help in advance
  Would you mind provide me some simple sample code?
  Thank you very much in advance.</p>