CtMethod newMethod = makeNewMethod(ctMethod, returnCtClass, methodName, paramTypes, "{\n" + methodBody + generateCallToSuper(methodName, paramTypes) + "\n}"); newMethod.setModifiers(newModifiers); if (wasDeclaredInClass) { CtMethod newMethod = makeNewMethod(ctMethod, returnCtClass, methodName, paramTypes, "{\n" + methodBody + "\n}"); ctMethod.setBody(newMethod, null); wrapMethodInvocation(ctMethod, isStatic);