1 8 package test.annotation; 9 10 import java.lang.annotation.Retention ; 11 import java.lang.annotation.RetentionPolicy ; 12 13 16 @Retention (RetentionPolicy.RUNTIME) 17 public @interface DefaultedAnnotation { 18 19 public String s() default "default"; 20 21 public int[] is() default {1,2}; 22 23 public Class klass() default ReferencedClass.class; 24 25 public Class [] klass2() default {ReferencedClass[].class, ReferencedClass.class}; 26 27 public NestedDefaultedAnnotation nested() default @NestedDefaultedAnnotation(s="default_const"); 28 29 public NestedDefaultedAnnotation nested2() default @NestedDefaultedAnnotation; 30 31 static @interface NestedDefaultedAnnotation { 32 public String s() default "default_nested"; 33 } 34 35 } 36 | Popular Tags |