summaryrefslogtreecommitdiffstats
path: root/tests/java5/reflection/AtAspectJDeclareParents.aj
blob: d60f6a3c65109c988882e75ba610e38f3d0930d2 (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
import org.aspectj.lang.annotation.*;

public aspect AtAspectJDeclareParents {
	
	@DeclareParents("C")
	public static I mixin = new Impl();
	
}

class C {}

interface I{
	
	int getX();
	
	void setX(int x);
	
}

class Impl implements I {
	
	private int x;
	
	public int getX() { return this.x; }
	
	public void setX(int x) { this.x = x; }
}