1/*
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24import java.lang.annotation.*;
25
26@Retention(RetentionPolicy.CLASS)
27@Repeatable(RuntimeInvisibleRepeatableContainer.class)
28@interface RuntimeInvisibleRepeatable {
29    boolean booleanValue() default false;
30    byte byteValue() default 0;
31    char charValue() default 0;
32    short shortValue() default 0;
33    int intValue() default 0;
34    long longValue() default 0;
35    float floatValue() default 0;
36    double doubleValue() default 0;
37    String stringValue() default "";
38    int[] arrayValue1() default {};
39    String[] arrayValue2() default {};
40    Class<?> classValue1() default void.class;
41    Class<?> classValue2() default void.class;
42    EnumValue enumValue() default EnumValue.VALUE1;
43    AnnotationValue annoValue() default @AnnotationValue(stringValue = "StringValue");
44    AnnotationValue[] annoArrayValue() default
45            {@AnnotationValue(stringValue = "StringValue1"),
46                    @AnnotationValue(stringValue = "StringValue2"),
47                    @AnnotationValue(stringValue = "StringValue3")};
48}
49
50@Retention(RetentionPolicy.CLASS)
51@interface RuntimeInvisibleRepeatableContainer {
52    RuntimeInvisibleRepeatable[] value();
53}
54
55@interface RuntimeInvisibleNotRepeatable {
56    boolean booleanValue() default false;
57    byte byteValue() default 0;
58    char charValue() default 0;
59    short shortValue() default 0;
60    int intValue() default 0;
61    long longValue() default 0;
62    float floatValue() default 0;
63    double doubleValue() default 0;
64    String stringValue() default "";
65    int[] arrayValue1() default {};
66    String[] arrayValue2() default {};
67    Class<?> classValue1() default void.class;
68    Class<?> classValue2() default void.class;
69    EnumValue enumValue() default EnumValue.VALUE1;
70    AnnotationValue annoValue() default @AnnotationValue(stringValue = "StringValue");
71    AnnotationValue[] annoArrayValue() default
72            {@AnnotationValue(stringValue = "StringValue1"),
73                    @AnnotationValue(stringValue = "StringValue2"),
74                    @AnnotationValue(stringValue = "StringValue3")};
75}
76
77@Retention(RetentionPolicy.RUNTIME)
78@Repeatable(RuntimeVisibleRepeatableContainer.class)
79@interface RuntimeVisibleRepeatable {
80    boolean booleanValue() default false;
81    byte byteValue() default 0;
82    char charValue() default 0;
83    short shortValue() default 0;
84    int intValue() default 0;
85    long longValue() default 0;
86    float floatValue() default 0;
87    double doubleValue() default 0;
88    String stringValue() default "";
89    int[] arrayValue1() default {};
90    String[] arrayValue2() default {};
91    Class<?> classValue1() default void.class;
92    Class<?> classValue2() default void.class;
93    EnumValue enumValue() default EnumValue.VALUE1;
94    AnnotationValue annoValue() default @AnnotationValue(stringValue = "StringValue");
95    AnnotationValue[] annoArrayValue() default
96            {@AnnotationValue(stringValue = "StringValue1"),
97                    @AnnotationValue(stringValue = "StringValue2"),
98                    @AnnotationValue(stringValue = "StringValue3")};
99}
100
101@Retention(RetentionPolicy.RUNTIME)
102@interface RuntimeVisibleRepeatableContainer {
103    RuntimeVisibleRepeatable[] value();
104}
105
106@Retention(RetentionPolicy.RUNTIME)
107@interface RuntimeVisibleNotRepeatable {
108    boolean booleanValue() default false;
109    byte byteValue() default 0;
110    char charValue() default 0;
111    short shortValue() default 0;
112    int intValue() default 0;
113    long longValue() default 0;
114    float floatValue() default 0;
115    double doubleValue() default 0;
116    String stringValue() default "";
117    int[] arrayValue1() default {};
118    String[] arrayValue2() default {};
119    Class<?> classValue1() default void.class;
120    Class<?> classValue2() default void.class;
121    EnumValue enumValue() default EnumValue.VALUE1;
122    AnnotationValue annoValue() default @AnnotationValue(stringValue = "StringValue");
123    AnnotationValue[] annoArrayValue() default
124            {@AnnotationValue(stringValue = "StringValue1"),
125                    @AnnotationValue(stringValue = "StringValue2"),
126                    @AnnotationValue(stringValue = "StringValue3")};
127}
128
129enum EnumValue {
130    VALUE1, VALUE2, VALUE3
131}
132
133@interface AnnotationValue {
134    String stringValue() default "";
135}