mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
23 lines
514 B
Java
23 lines
514 B
Java
|
import org.aspectj.testing.*;
|
||
|
|
||
|
public class Orleans {
|
||
|
static boolean called = false;
|
||
|
public static void main(String[] args) {
|
||
|
String hello[] = new String[] { "h", "e", "l", "l", "o" };
|
||
|
Object o = new Object();
|
||
|
o = new Orleans(true);
|
||
|
Tester.check(called, "Advice was not called.");
|
||
|
}
|
||
|
|
||
|
public Orleans(boolean b) {}
|
||
|
}
|
||
|
|
||
|
aspect ResourceAccounting issingleton() {
|
||
|
pointcut constructions(): call(new(..));
|
||
|
before(): constructions() {
|
||
|
Orleans.called = true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|