You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Test.java 481B

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. public class Test {
  3. public static void main(String[] arguments){
  4. Test test = new Test();
  5. Tester.checkEqual(TestAspect.sawDirectCall, false, "no calls");
  6. test.doSayHello();
  7. Tester.checkEqual(TestAspect.sawDirectCall, false, "non-cflow");
  8. test.sayHello();
  9. Tester.checkEqual(TestAspect.sawDirectCall, true, "in-cflow");
  10. }
  11. public void sayHello(){
  12. doSayHello();
  13. }
  14. public void doSayHello(){
  15. System.out.println("hello.");
  16. }
  17. }