aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/ataspectj/annotationGen/SA.aj
blob: 5ca3d661a8d1f1eac8f620b46cba27b70237b466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import org.aspectj.lang.annotation.Aspect;
import java.lang.annotation.*;

public aspect SA {
	
	public static void main(String[] args) {
		Annotation[] annotations = SA.class.getAnnotations();
		if (annotations.length != 1) throw new RuntimeException("Should have one annotation but has "+annotations.length);
		Aspect aspectAnnotation = (Aspect) annotations[0];
System.out.println(aspectAnnotation);
		if (!aspectAnnotation.value().equals("")) throw new RuntimeException("value should be empty");
	}
	
}