KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > annotation > DefaultedAnnotation


1 /**************************************************************************************
2  * Copyright (c) Jonas Bonér, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the LGPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package test.annotation;
9
10 import java.lang.annotation.Retention JavaDoc;
11 import java.lang.annotation.RetentionPolicy JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
15  */

16 @Retention JavaDoc(RetentionPolicy.RUNTIME)
17 public @interface DefaultedAnnotation {
18
19     public String JavaDoc s() default "default";
20
21     public int[] is() default {1,2};
22
23     public Class JavaDoc klass() default ReferencedClass.class;
24
25     public Class JavaDoc[] 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 JavaDoc s() default "default_nested";
33     }
34
35 }
36
Popular Tags