summaryrefslogtreecommitdiffstats
path: root/tests/base/test127/Driver.java
blob: c72e10327ed5d08fa90441f954b5f69a8df15424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.aspectj.testing.Tester;

public class Driver {
    public static void main(String[] args) { test(); }

    public static void test() {
        new C().foo("hello");    
    }
}

class C {
    void foo(String s) {
        Tester.checkEqual(s, "hello", "in method body");
    }
}

aspect A {
     before(String str): target(C) && call(void foo(String)) && args(str) {
        Tester.checkEqual(str, "hello", "in advice body");     
    }
}