@Test public void testCheckAllFields_should_succeed_with_all_fields_defined() throws AfterBurnerImpossibleException { CtClass classToInsertInto = CtClass.intType; String body = ""; InsertableConstructor constructor = builder .insertIntoClass(classToInsertInto) .withBody(body) .createInsertableConstructor(); assertNotNull(constructor); assertEquals(classToInsertInto, constructor.getClassToInsertInto()); assertEquals(body, constructor.getConstructorBody(null)); assertTrue(constructor.acceptParameters(null)); }
public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get(clazzToInsertInto.getName()); return new StateTargetClassSet(); }
InsertableConstructorBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get(clazzToInsertInto.getName()); return new StateTargetClassSet(); } }
InsertableConstructorBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get(clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableConstructorBuilder(AfterBurner afterBurner); }
InsertableConstructorBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get(clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableConstructorBuilder(AfterBurner afterBurner); StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto); StateTargetClassSet insertIntoClass(CtClass clazzToInsertInto); }
InsertableConstructorBuilder { public StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto) throws NotFoundException { this.classToInsertInto = ClassPool.getDefault().get(clazzToInsertInto.getName()); return new StateTargetClassSet(); } InsertableConstructorBuilder(AfterBurner afterBurner); StateTargetClassSet insertIntoClass(Class<?> clazzToInsertInto); StateTargetClassSet insertIntoClass(CtClass clazzToInsertInto);  }