aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testdata/src1/A.java
blob: 9be597f7e88c764f8c9d27bd6885c6e706fc0ec1 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
public aspect A issingleton() {
    public void m(int x) {
        System.out.println(x);
    }

    pointcut foo(String[] args): I.foo(args) && execution(void Hello.*(..));

	///XXX add a test for this correctly
	//XXXpublic int Hello.fromA;

    before(): execution(* Hello.*(..)) {
        System.out.println("enter");
    }
    

    public void pingHello(Hello h) {
        int x = 2; 
        System.out.println(x);
    }
    
    public static void main(String[] args) {
    	Hello.main(args);
    }
}

class Hello {
    public static void main(String[] args) {
    }
}


interface I {
	pointcut foo(String[] i): args(i);
	
	static aspect InnerA {
		before(): this(String) {
			System.out.println("hi");
		}
	}
    //void foo();
}