Multiple arguments with around advice
I am given a method in a class like开发者_开发知识库 this..
public int foo(String a,String b){}
Now I want to apply a pointcut at this point and using around advice I want to alter the second argument.
public aspect Aspect {
int around(String s): call(int foo(Object,String)) && args(i) {
int i = proceed(i.concat("hello"));
return i;
}
}
But I am not able to do so..Its giving me the error that Aspect has not been applied. adviceDidnotMatch..
Any help please..I am stuck..:-/ Thanks in advance..
Your proceed()
and around()
don't match.
proceed()
should be called with both arguments.
精彩评论