summaryrefslogtreecommitdiffstats
path: root/tests/java5/annotations/ajdkExamples/RetentionTime.aj
blob: f3c0722fbe6efcca2a0950ae17e2630dd2625918 (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
import java.lang.annotation.*;

public aspect RetentionTime {
	
	pointcut withinType() : @within(Foo);
	pointcut withinTypeBind(Foo foo) : @within(foo);
	pointcut withinTypeClass() : @within(Goo);
	pointcut withinTypeClassBind(Goo goo) : @within(goo);
	
	pointcut withincodeAnn() : @withincode(Foo);
	pointcut withincodeAnnBind(Foo foo) : @withincode(foo);
	pointcut withincodeAnnClass() : @withincode(Goo);
	pointcut withincodeAnnBindClass(Goo goo) : @withincode(goo);
	
	pointcut atann() : @annotation(Foo);
	pointcut atannBind(Foo foo) : @annotation(foo);
	pointcut atannClass() : @annotation(Goo);
	pointcut atannBindClass(Goo goo) : @annotation(goo);
		
}

@Retention(RetentionPolicy.RUNTIME) @interface Foo {}

@interface Goo {}