pointcut doesn't match one of two methods. [message #589505] |
Mon, 18 July 2005 08:41 |
Michael Moser Messages: 914 Registered: July 2009 |
Senior Member |
|
|
I have two methods:
protected boolean evaluate() throws Exception { ... }
and
protected boolean evaluate(final int i) throws Exception { ... }
I am trying to define a pointcut that matches both of them.
I tried:
pointcut exec_evaluate(Foo bar) :
execution(boolean Foo.evaluate(..)) && target(bar);
pointcut exec_evaluate(Foo bar) :
execution(boolean Foo.evaluate(*)) && target(bar);
pointcut exec_evaluate(Foo bar) :
(execution(boolean Foo.evaluate()) && target(bar)) ||
(execution(boolean Foo.evaluate(int)) && target(bar));
But all of these only match the second method (i.e. the one with the int
parameter) but not the parameterless method. What am I doing wrong or
what am I missing here???
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03824 seconds