You can use javassist http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/tutorial/tutorial.html to change a class on the fly. Something like this:
ClassPool pool = ClassPool.getDefault();
CtClass sp = pool.get("SomeProcess");
for (CtMethod m : sp.getDeclaredMethods()) {
if (m.hasAnnotation(ToBeTransformed.class)) {
String body = // create new body
m.setBody(body);
}
}