mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-03 17:56:34 +02:00
30 lines
671 B
Plaintext
30 lines
671 B
Plaintext
![]() |
public class Pr114054 {
|
||
|
public static boolean passed;
|
||
|
public static void main(String[] args) {
|
||
|
SampleSeries me = new SampleSeries();
|
||
|
me.okSeries();
|
||
|
me.open();
|
||
|
me.close();
|
||
|
if (!passed) {
|
||
|
throw new Error("failed to advise...");
|
||
|
}
|
||
|
}
|
||
|
static class SampleSeries {
|
||
|
void open() {}
|
||
|
void close() {}
|
||
|
void okSeries() {open(); close();}
|
||
|
}
|
||
|
static aspect AAAA
|
||
|
// comment this out, and !call(...) works
|
||
|
pertarget(tracked())
|
||
|
{
|
||
|
protected final pointcut tracked() :
|
||
|
call(void SampleSeries.*())
|
||
|
// comment this out, and pertarget works...
|
||
|
&& !call(void SampleSeries.*Series())
|
||
|
;
|
||
|
before() : tracked() {
|
||
|
Pr114054.passed = true;
|
||
|
}
|
||
|
}
|
||
|
}
|