org.aspectj/tests/new/DeclareWarningMain.java

20 lines
496 B
Java
Raw Normal View History

2002-12-16 19:51:06 +01:00
import org.aspectj.testing.*;
public class DeclareWarningMain {
public static void main (String[] args) { // DW 4 main
2002-12-16 19:51:06 +01:00
Tester.checkAllEvents();
}
static {
Tester.expectEvent("before");
}
}
aspect Warnings {
declare warning : execution(static void main(String[])) : "main"; // for DW 4 main
2002-12-16 19:51:06 +01:00
// just to show that pointcut is valid - works if warning removed
before() : execution(static void main(String[])) {
Tester.event("before");
}
}