public static void premain ( String args , Instrumentation inst ) { GagTransformer transformer = new GagTransformer ( ) ; if ( args == null || args . length ( ) == 0 ) { transformer . addAllGenerators ( ) ; } else { for ( String key : args . split ( "," ) ) { transformer . addGeneratorForKey ( key ) ; } } inst . addTransformer ( transformer ) ; }
An instrumentation agent needs to have a premain method .