author | darcy |
Thu, 17 Jul 2014 09:47:25 -0700 | |
changeset 25690 | b1dac768ab79 |
parent 22170 | 62da5257a0a7 |
child 36526 | 3b41f1c69604 |
permissions | -rw-r--r-- |
6720 | 1 |
/* |
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
2 |
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. |
6720 | 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 |
||
24 |
import java.util.*; |
|
25 |
import javax.annotation.processing.*; |
|
26 |
import javax.lang.model.SourceVersion; |
|
27 |
import javax.lang.model.util.*; |
|
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
28 |
import static javax.lang.model.SourceVersion.*; |
6720 | 29 |
|
30 |
/** |
|
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
31 |
* An abstract annotation processor tailored to {@code javac} regression testing. |
6720 | 32 |
*/ |
33 |
public abstract class JavacTestingAbstractProcessor extends AbstractProcessor { |
|
34 |
private static final Set<String> allAnnotations; |
|
35 |
||
36 |
static { |
|
37 |
Set<String> tmp = new HashSet<>(); |
|
38 |
tmp.add("*"); |
|
39 |
allAnnotations = Collections.unmodifiableSet(tmp); |
|
40 |
} |
|
41 |
||
42 |
protected Elements eltUtils; |
|
43 |
protected Elements elements; |
|
44 |
protected Types typeUtils; |
|
45 |
protected Types types; |
|
46 |
protected Filer filer; |
|
47 |
protected Messager messager; |
|
48 |
protected Map<String, String> options; |
|
49 |
||
50 |
/** |
|
51 |
* Constructor for subclasses to call. |
|
52 |
*/ |
|
53 |
protected JavacTestingAbstractProcessor() { |
|
54 |
super(); |
|
55 |
} |
|
56 |
||
57 |
/** |
|
58 |
* Return the latest source version. Unless this method is |
|
59 |
* overridden, an {@code IllegalStateException} will be thrown if a |
|
60 |
* subclass has a {@code SupportedSourceVersion} annotation. |
|
61 |
*/ |
|
62 |
@Override |
|
63 |
public SourceVersion getSupportedSourceVersion() { |
|
64 |
SupportedSourceVersion ssv = this.getClass().getAnnotation(SupportedSourceVersion.class); |
|
65 |
if (ssv != null) |
|
66 |
throw new IllegalStateException("SupportedSourceVersion annotation not supported here."); |
|
67 |
||
68 |
return SourceVersion.latest(); |
|
69 |
} |
|
70 |
||
71 |
/** |
|
72 |
* If the processor class is annotated with {@link |
|
73 |
* SupportedAnnotationTypes}, return an unmodifiable set with the |
|
74 |
* same set of strings as the annotation. If the class is not so |
|
75 |
* annotated, a one-element set containing {@code "*"} is returned |
|
76 |
* to indicate all annotations are processed. |
|
77 |
* |
|
78 |
* @return the names of the annotation types supported by this |
|
79 |
* processor, or an empty set if none |
|
80 |
*/ |
|
81 |
@Override |
|
82 |
public Set<String> getSupportedAnnotationTypes() { |
|
83 |
SupportedAnnotationTypes sat = this.getClass().getAnnotation(SupportedAnnotationTypes.class); |
|
84 |
if (sat != null) |
|
85 |
return super.getSupportedAnnotationTypes(); |
|
86 |
else |
|
87 |
return allAnnotations; |
|
88 |
} |
|
89 |
||
90 |
@Override |
|
91 |
public void init(ProcessingEnvironment processingEnv) { |
|
92 |
super.init(processingEnv); |
|
93 |
elements = eltUtils = processingEnv.getElementUtils(); |
|
94 |
types = typeUtils = processingEnv.getTypeUtils(); |
|
95 |
filer = processingEnv.getFiler(); |
|
96 |
messager = processingEnv.getMessager(); |
|
97 |
options = processingEnv.getOptions(); |
|
98 |
} |
|
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
99 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
100 |
/* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
101 |
* The set of visitors below will directly extend the most recent |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
102 |
* corresponding platform visitor type. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
103 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
104 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
105 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
106 |
public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
107 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
108 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
109 |
* Constructor for concrete subclasses to call. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
110 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
111 |
protected AbstractAnnotationValueVisitor() { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
112 |
super(); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
113 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
114 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
115 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
116 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
117 |
public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
118 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
119 |
* Constructor for concrete subclasses to call. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
120 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
121 |
protected AbstractElementVisitor(){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
122 |
super(); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
123 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
124 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
125 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
126 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
127 |
public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
128 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
129 |
* Constructor for concrete subclasses to call. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
130 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
131 |
protected AbstractTypeVisitor() { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
132 |
super(); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
133 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
134 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
135 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
136 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
137 |
public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
138 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
139 |
* Constructor for concrete subclasses; uses {@code null} for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
140 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
141 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
142 |
protected ElementKindVisitor() { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
143 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
144 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
145 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
146 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
147 |
* Constructor for concrete subclasses; uses the argument for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
148 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
149 |
* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
150 |
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
151 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
152 |
protected ElementKindVisitor(R defaultValue) { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
153 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
154 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
155 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
156 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
157 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
158 |
public static class ElementScanner<R, P> extends ElementScanner9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
159 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
160 |
* Constructor for concrete subclasses; uses {@code null} for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
161 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
162 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
163 |
protected ElementScanner(){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
164 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
165 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
166 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
167 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
168 |
* Constructor for concrete subclasses; uses the argument for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
169 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
170 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
171 |
protected ElementScanner(R defaultValue){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
172 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
173 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
174 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
175 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
176 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
177 |
public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
178 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
179 |
* Constructor for concrete subclasses; uses {@code null} for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
180 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
181 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
182 |
protected SimpleAnnotationValueVisitor() { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
183 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
184 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
185 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
186 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
187 |
* Constructor for concrete subclasses; uses the argument for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
188 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
189 |
* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
190 |
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
191 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
192 |
protected SimpleAnnotationValueVisitor(R defaultValue) { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
193 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
194 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
195 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
196 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
197 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
198 |
public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
199 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
200 |
* Constructor for concrete subclasses; uses {@code null} for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
201 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
202 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
203 |
protected SimpleElementVisitor(){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
204 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
205 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
206 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
207 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
208 |
* Constructor for concrete subclasses; uses the argument for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
209 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
210 |
* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
211 |
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
212 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
213 |
protected SimpleElementVisitor(R defaultValue){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
214 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
215 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
216 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
217 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
218 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
219 |
public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
220 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
221 |
* Constructor for concrete subclasses; uses {@code null} for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
222 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
223 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
224 |
protected SimpleTypeVisitor(){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
225 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
226 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
227 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
228 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
229 |
* Constructor for concrete subclasses; uses the argument for the |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
230 |
* default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
231 |
* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
232 |
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
233 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
234 |
protected SimpleTypeVisitor(R defaultValue){ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
235 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
236 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
237 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
238 |
|
22170
62da5257a0a7
8031360: Update langtools code base to use RELEASE_9
darcy
parents:
10192
diff
changeset
|
239 |
@SupportedSourceVersion(RELEASE_9) |
25690
b1dac768ab79
8050430: Provided new utility visitors supporting SourceVersion.RELEASE_9
darcy
parents:
22170
diff
changeset
|
240 |
public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> { |
10192
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
241 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
242 |
* Constructor for concrete subclasses to call; uses {@code null} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
243 |
* for the default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
244 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
245 |
protected TypeKindVisitor() { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
246 |
super(null); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
247 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
248 |
|
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
249 |
/** |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
250 |
* Constructor for concrete subclasses to call; uses the argument |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
251 |
* for the default value. |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
252 |
* |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
253 |
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
254 |
*/ |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
255 |
protected TypeKindVisitor(R defaultValue) { |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
256 |
super(defaultValue); |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
257 |
} |
378321489bea
7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
darcy
parents:
8846
diff
changeset
|
258 |
} |
6720 | 259 |
} |