summaryrefslogtreecommitdiffstats
path: root/tests/new/AspectRedefinesParam.java
blob: 11de62a0a01c29c9ba22bbc5c88632fc1ef56e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import org.aspectj.testing.Tester;

/**
 * Test for: PR #65
 */

public aspect AspectRedefinesParam {
    public static void main(String[] args) { test(); }

    public static void test() {
        Tester.checkEqual(new Foo().b("a"), "a", "b('a')");
    }

    pointcut ccut(String s): this(Foo) && call(String b(String)) && args(s);

    before(String methodString): ccut(methodString) {
            String s;
            s = "b";
            methodString += s;
    }
}

class Foo {
    String b( String s ) {
        return s;
    }
}