aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/reflection/AtAspectJDeclareParents.aj
blob: fddf12a56bd03dead5171c1bc20b9a41a8bb000e (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(value="C",defaultImpl=Impl.class)
	private I implementedInterface;
	
}

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; }
}