is there a way to manipulate the VM in a way that the calling method gets a return-value generated/determine by a JVMTI agent.
I can catch MethodCalls via MethodEntry(jvmtiEnv* ......);
And i can pop the topmost Stackframe via PopFrame(jvmtiEnv* ........)
But how i manipulate the stack to define a return value.
Thanks this will work. But unfortunatly only for java 6+.
My First idea was to inject my mocks (see mockinject.dev.java.net) via JVMTI instead of AspectJ
I think that i can create this features for java 6+ only.
And for java 5 i must use my existing AspectJ funtionality for early returning values.