@Test public void testCheckAllFields_should_succeed_with_insert_after_method_defined() throws AfterBurnerImpossibleException { CtClass classToInsertInto = CtClass.intType; String targetMethod = ""; String insertionAfterMethod = ""; String fullMethod = ""; String body = ""; InsertableMethod method = builder .insertIntoClass(classToInsertInto) .inMethodIfExists(targetMethod) .afterACallTo(insertionAfterMethod) .withBody(body) .elseCreateMethodIfNotExists(fullMethod) .createInsertableMethod(); assertNotNull(method); assertEquals(classToInsertInto, method.getClassToInsertInto()); assertEquals(targetMethod, method.getTargetMethodName()); assertNull(method.getInsertionBeforeMethod()); assertEquals(insertionAfterMethod, method.getInsertionAfterMethod()); assertEquals(fullMethod, method.getFullMethod()); assertEquals(body, method.getBody()); }
public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get( clazzToInsertInto.getName()); return new StateTargetClassSet(); }
InsertableMethodBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get( clazzToInsertInto.getName()); return new StateTargetClassSet(); } }
InsertableMethodBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get( clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableMethodBuilder(AfterBurner afterBurner);  InsertableMethodBuilder(AfterBurner afterBurner,
            CtMethodJavaWriter signatureExtractor); }
InsertableMethodBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get( clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableMethodBuilder(AfterBurner afterBurner);  InsertableMethodBuilder(AfterBurner afterBurner,
            CtMethodJavaWriter signatureExtractor); StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto); StateTargetClassSet insertIntoClass(CtClass classToInsertInto); }
InsertableMethodBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get( clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableMethodBuilder(AfterBurner afterBurner);  InsertableMethodBuilder(AfterBurner afterBurner,
            CtMethodJavaWriter signatureExtractor); StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto); StateTargetClassSet insertIntoClass(CtClass classToInsertInto);  }