author | emc |
Mon, 03 Feb 2014 17:19:15 -0500 | |
changeset 22702 | 1297fbaf34fa |
parent 20249 | 93f8eae31092 |
child 23975 | c7c81595aea9 |
permissions | -rw-r--r-- |
3150 | 1 |
/* |
15385 | 2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
3150 | 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 |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
3150 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
3150 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
3150 | 24 |
*/ |
25 |
||
26 |
package com.sun.tools.javac.code; |
|
27 |
||
15385 | 28 |
import java.util.Iterator; |
29 |
||
17578 | 30 |
import com.sun.tools.javac.tree.JCTree.JCLambda; |
3150 | 31 |
import com.sun.tools.javac.util.*; |
32 |
||
33 |
/** A type annotation position. |
|
34 |
* |
|
5847
1908176fd6e3
6944312: Potential rebranding issues in openjdk/langtools repository sources
jjg
parents:
5520
diff
changeset
|
35 |
* <p><b>This is NOT part of any supported API. |
1908176fd6e3
6944312: Potential rebranding issues in openjdk/langtools repository sources
jjg
parents:
5520
diff
changeset
|
36 |
* If you write code that depends on this, you do so at your own risk. |
3150 | 37 |
* This code and its internal interfaces are subject to change or |
38 |
* deletion without notice.</b> |
|
39 |
*/ |
|
15385 | 40 |
// Code duplicated in com.sun.tools.classfile.TypeAnnotation.Position |
3150 | 41 |
public class TypeAnnotationPosition { |
42 |
||
15385 | 43 |
public enum TypePathEntryKind { |
44 |
ARRAY(0), |
|
45 |
INNER_TYPE(1), |
|
46 |
WILDCARD(2), |
|
47 |
TYPE_ARGUMENT(3); |
|
48 |
||
49 |
public final int tag; |
|
50 |
||
51 |
private TypePathEntryKind(int tag) { |
|
52 |
this.tag = tag; |
|
53 |
} |
|
54 |
} |
|
55 |
||
56 |
public static class TypePathEntry { |
|
57 |
/** The fixed number of bytes per TypePathEntry. */ |
|
58 |
public static final int bytesPerEntry = 2; |
|
59 |
||
60 |
public final TypePathEntryKind tag; |
|
61 |
public final int arg; |
|
62 |
||
63 |
public static final TypePathEntry ARRAY = new TypePathEntry(TypePathEntryKind.ARRAY); |
|
64 |
public static final TypePathEntry INNER_TYPE = new TypePathEntry(TypePathEntryKind.INNER_TYPE); |
|
65 |
public static final TypePathEntry WILDCARD = new TypePathEntry(TypePathEntryKind.WILDCARD); |
|
66 |
||
67 |
private TypePathEntry(TypePathEntryKind tag) { |
|
68 |
Assert.check(tag == TypePathEntryKind.ARRAY || |
|
69 |
tag == TypePathEntryKind.INNER_TYPE || |
|
70 |
tag == TypePathEntryKind.WILDCARD, |
|
71 |
"Invalid TypePathEntryKind: " + tag); |
|
72 |
this.tag = tag; |
|
73 |
this.arg = 0; |
|
74 |
} |
|
75 |
||
76 |
public TypePathEntry(TypePathEntryKind tag, int arg) { |
|
77 |
Assert.check(tag == TypePathEntryKind.TYPE_ARGUMENT, |
|
78 |
"Invalid TypePathEntryKind: " + tag); |
|
79 |
this.tag = tag; |
|
80 |
this.arg = arg; |
|
81 |
} |
|
82 |
||
83 |
public static TypePathEntry fromBinary(int tag, int arg) { |
|
84 |
Assert.check(arg == 0 || tag == TypePathEntryKind.TYPE_ARGUMENT.tag, |
|
85 |
"Invalid TypePathEntry tag/arg: " + tag + "/" + arg); |
|
86 |
switch (tag) { |
|
87 |
case 0: |
|
88 |
return ARRAY; |
|
89 |
case 1: |
|
90 |
return INNER_TYPE; |
|
91 |
case 2: |
|
92 |
return WILDCARD; |
|
93 |
case 3: |
|
94 |
return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg); |
|
95 |
default: |
|
96 |
Assert.error("Invalid TypePathEntryKind tag: " + tag); |
|
97 |
return null; |
|
98 |
} |
|
99 |
} |
|
100 |
||
101 |
@Override |
|
102 |
public String toString() { |
|
103 |
return tag.toString() + |
|
104 |
(tag == TypePathEntryKind.TYPE_ARGUMENT ? ("(" + arg + ")") : ""); |
|
105 |
} |
|
106 |
||
107 |
@Override |
|
108 |
public boolean equals(Object other) { |
|
109 |
if (! (other instanceof TypePathEntry)) { |
|
110 |
return false; |
|
111 |
} |
|
112 |
TypePathEntry tpe = (TypePathEntry) other; |
|
113 |
return this.tag == tpe.tag && this.arg == tpe.arg; |
|
114 |
} |
|
115 |
||
116 |
@Override |
|
117 |
public int hashCode() { |
|
118 |
return this.tag.hashCode() * 17 + this.arg; |
|
119 |
} |
|
120 |
} |
|
121 |
||
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
122 |
public static final List<TypePathEntry> emptyPath = List.nil(); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
123 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
124 |
// NOTE: All of these will be converted to final fields eventually. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
125 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
126 |
public final TargetType type; |
3150 | 127 |
|
128 |
// For generic/array types. |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
129 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
130 |
// This field is in the process of being made final. Do not |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
131 |
// introduce new mutations. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
132 |
public List<TypePathEntry> location; |
3150 | 133 |
|
134 |
// Tree position. |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
135 |
public final int pos; |
3150 | 136 |
|
15718 | 137 |
// For type casts, type tests, new, locals (as start_pc), |
138 |
// and method and constructor reference type arguments. |
|
3151
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
139 |
public boolean isValidOffset = false; |
3150 | 140 |
public int offset = -1; |
141 |
||
142 |
// For locals. arrays same length |
|
4866
21f0ac9e5a20
6918127: improve handling of TypeAnnotationPosition fields
jjg
parents:
3300
diff
changeset
|
143 |
public int[] lvarOffset = null; |
21f0ac9e5a20
6918127: improve handling of TypeAnnotationPosition fields
jjg
parents:
3300
diff
changeset
|
144 |
public int[] lvarLength = null; |
21f0ac9e5a20
6918127: improve handling of TypeAnnotationPosition fields
jjg
parents:
3300
diff
changeset
|
145 |
public int[] lvarIndex = null; |
3150 | 146 |
|
147 |
// For type parameter bound |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
148 |
public final int bound_index; |
3150 | 149 |
|
150 |
// For type parameter and method parameter |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
151 |
public final int parameter_index; |
3150 | 152 |
|
15385 | 153 |
// For class extends, implements, and throws clauses |
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
154 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
155 |
// This field is effectively final. However, it needs to be |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
156 |
// modified by Gen for the time being. Do not introduce new |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
157 |
// mutations. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
158 |
public int type_index; |
3150 | 159 |
|
17578 | 160 |
// For exception parameters, index into exception table. |
161 |
// In com.sun.tools.javac.jvm.Gen.genCatch we first set the type_index |
|
162 |
// to the catch type index - that value is only temporary. |
|
163 |
// Then in com.sun.tools.javac.jvm.Code.fillExceptionParameterPositions |
|
164 |
// we use that value to determine the exception table index. |
|
15385 | 165 |
public int exception_index = Integer.MIN_VALUE; |
166 |
||
17578 | 167 |
// If this type annotation is within a lambda expression, |
168 |
// store a pointer to the lambda expression tree in order |
|
169 |
// to allow a later translation to the right method. |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
170 |
public final JCLambda onLambda; |
17578 | 171 |
|
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
172 |
// NOTE: This constructor will eventually go away, and be replaced |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
173 |
// by static builder methods. |
3150 | 174 |
|
175 |
@Override |
|
176 |
public String toString() { |
|
177 |
StringBuilder sb = new StringBuilder(); |
|
178 |
sb.append('['); |
|
179 |
sb.append(type); |
|
180 |
||
181 |
switch (type) { |
|
15385 | 182 |
// instanceof |
3150 | 183 |
case INSTANCEOF: |
15385 | 184 |
// new expression |
3150 | 185 |
case NEW: |
15718 | 186 |
// constructor/method reference receiver |
187 |
case CONSTRUCTOR_REFERENCE: |
|
188 |
case METHOD_REFERENCE: |
|
3150 | 189 |
sb.append(", offset = "); |
190 |
sb.append(offset); |
|
191 |
break; |
|
15385 | 192 |
// local variable |
3150 | 193 |
case LOCAL_VARIABLE: |
15385 | 194 |
// resource variable |
195 |
case RESOURCE_VARIABLE: |
|
196 |
if (lvarOffset == null) { |
|
197 |
sb.append(", lvarOffset is null!"); |
|
198 |
break; |
|
199 |
} |
|
3150 | 200 |
sb.append(", {"); |
201 |
for (int i = 0; i < lvarOffset.length; ++i) { |
|
202 |
if (i != 0) sb.append("; "); |
|
15385 | 203 |
sb.append("start_pc = "); |
3150 | 204 |
sb.append(lvarOffset[i]); |
205 |
sb.append(", length = "); |
|
206 |
sb.append(lvarLength[i]); |
|
207 |
sb.append(", index = "); |
|
208 |
sb.append(lvarIndex[i]); |
|
209 |
} |
|
210 |
sb.append("}"); |
|
211 |
break; |
|
15385 | 212 |
// method receiver |
3150 | 213 |
case METHOD_RECEIVER: |
214 |
// Do nothing |
|
215 |
break; |
|
15385 | 216 |
// type parameter |
3150 | 217 |
case CLASS_TYPE_PARAMETER: |
218 |
case METHOD_TYPE_PARAMETER: |
|
219 |
sb.append(", param_index = "); |
|
220 |
sb.append(parameter_index); |
|
221 |
break; |
|
15385 | 222 |
// type parameter bound |
3150 | 223 |
case CLASS_TYPE_PARAMETER_BOUND: |
224 |
case METHOD_TYPE_PARAMETER_BOUND: |
|
225 |
sb.append(", param_index = "); |
|
226 |
sb.append(parameter_index); |
|
227 |
sb.append(", bound_index = "); |
|
228 |
sb.append(bound_index); |
|
229 |
break; |
|
15385 | 230 |
// class extends or implements clause |
3150 | 231 |
case CLASS_EXTENDS: |
232 |
sb.append(", type_index = "); |
|
233 |
sb.append(type_index); |
|
234 |
break; |
|
15385 | 235 |
// throws |
3150 | 236 |
case THROWS: |
237 |
sb.append(", type_index = "); |
|
238 |
sb.append(type_index); |
|
239 |
break; |
|
15385 | 240 |
// exception parameter |
241 |
case EXCEPTION_PARAMETER: |
|
242 |
sb.append(", exception_index = "); |
|
243 |
sb.append(exception_index); |
|
3150 | 244 |
break; |
15385 | 245 |
// method parameter |
246 |
case METHOD_FORMAL_PARAMETER: |
|
3150 | 247 |
sb.append(", param_index = "); |
248 |
sb.append(parameter_index); |
|
249 |
break; |
|
15718 | 250 |
// type cast |
251 |
case CAST: |
|
15385 | 252 |
// method/constructor/reference type argument |
253 |
case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: |
|
254 |
case METHOD_INVOCATION_TYPE_ARGUMENT: |
|
15718 | 255 |
case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: |
15385 | 256 |
case METHOD_REFERENCE_TYPE_ARGUMENT: |
3150 | 257 |
sb.append(", offset = "); |
258 |
sb.append(offset); |
|
259 |
sb.append(", type_index = "); |
|
260 |
sb.append(type_index); |
|
261 |
break; |
|
15385 | 262 |
// We don't need to worry about these |
263 |
case METHOD_RETURN: |
|
264 |
case FIELD: |
|
265 |
break; |
|
3150 | 266 |
case UNKNOWN: |
15385 | 267 |
sb.append(", position UNKNOWN!"); |
3150 | 268 |
break; |
269 |
default: |
|
15385 | 270 |
Assert.error("Unknown target type: " + type); |
3150 | 271 |
} |
272 |
||
273 |
// Append location data for generics/arrays. |
|
15385 | 274 |
if (!location.isEmpty()) { |
3150 | 275 |
sb.append(", location = ("); |
276 |
sb.append(location); |
|
277 |
sb.append(")"); |
|
278 |
} |
|
279 |
||
280 |
sb.append(", pos = "); |
|
281 |
sb.append(pos); |
|
282 |
||
17578 | 283 |
if (onLambda != null) { |
284 |
sb.append(", onLambda hash = "); |
|
285 |
sb.append(onLambda.hashCode()); |
|
286 |
} |
|
287 |
||
3150 | 288 |
sb.append(']'); |
289 |
return sb.toString(); |
|
290 |
} |
|
3151
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
291 |
|
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
292 |
/** |
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
293 |
* Indicates whether the target tree of the annotation has been optimized |
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
294 |
* away from classfile or not. |
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
295 |
* @return true if the target has not been optimized away |
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
296 |
*/ |
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
297 |
public boolean emitToClassfile() { |
15385 | 298 |
return !type.isLocal() || isValidOffset; |
299 |
} |
|
300 |
||
17578 | 301 |
|
302 |
public boolean matchesPos(int pos) { |
|
303 |
return this.pos == pos; |
|
304 |
} |
|
305 |
||
306 |
public void updatePosOffset(int to) { |
|
307 |
offset = to; |
|
308 |
lvarOffset = new int[]{to}; |
|
309 |
isValidOffset = true; |
|
310 |
} |
|
311 |
||
15385 | 312 |
/** |
313 |
* Decode the binary representation for a type path and set |
|
314 |
* the {@code location} field. |
|
315 |
* |
|
316 |
* @param list The bytecode representation of the type path. |
|
317 |
*/ |
|
318 |
public static List<TypePathEntry> getTypePathFromBinary(java.util.List<Integer> list) { |
|
20249
93f8eae31092
6386236: Please rename com.sun.tools.javac.util.ListBuffer.lb()
alundblad
parents:
17578
diff
changeset
|
319 |
ListBuffer<TypePathEntry> loc = new ListBuffer<>(); |
15385 | 320 |
Iterator<Integer> iter = list.iterator(); |
321 |
while (iter.hasNext()) { |
|
322 |
Integer fst = iter.next(); |
|
323 |
Assert.check(iter.hasNext(), "Could not decode type path: " + list); |
|
324 |
Integer snd = iter.next(); |
|
325 |
loc = loc.append(TypePathEntry.fromBinary(fst, snd)); |
|
326 |
} |
|
327 |
return loc.toList(); |
|
328 |
} |
|
329 |
||
330 |
public static List<Integer> getBinaryFromTypePath(java.util.List<TypePathEntry> locs) { |
|
20249
93f8eae31092
6386236: Please rename com.sun.tools.javac.util.ListBuffer.lb()
alundblad
parents:
17578
diff
changeset
|
331 |
ListBuffer<Integer> loc = new ListBuffer<>(); |
15385 | 332 |
for (TypePathEntry tpe : locs) { |
333 |
loc = loc.append(tpe.tag.tag); |
|
334 |
loc = loc.append(tpe.arg); |
|
335 |
} |
|
336 |
return loc.toList(); |
|
3151
41800a86aad3
6854796: update JSR308 impl with latest code from type-annotations repo
jjg
parents:
3150
diff
changeset
|
337 |
} |
22702
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
338 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
339 |
// These methods are the new preferred way to create |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
340 |
// TypeAnnotationPositions |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
341 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
342 |
// Never make this a public constructor without creating a builder. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
343 |
private TypeAnnotationPosition(final TargetType ttype, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
344 |
final int pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
345 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
346 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
347 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
348 |
final int bound_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
349 |
final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
350 |
Assert.checkNonNull(location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
351 |
this.type = ttype; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
352 |
this.pos = pos; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
353 |
this.parameter_index = parameter_index; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
354 |
this.onLambda = onLambda; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
355 |
this.type_index = type_index; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
356 |
this.bound_index = bound_index; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
357 |
this.location = location; |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
358 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
359 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
360 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
361 |
* Create a {@code TypeAnnotationPosition} for a method return. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
362 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
363 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
364 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
365 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
366 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
367 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
368 |
methodReturn(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
369 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
370 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
371 |
return new TypeAnnotationPosition(TargetType.METHOD_RETURN, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
372 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
373 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
374 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
375 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
376 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
377 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
378 |
* Create a {@code TypeAnnotationPosition} for a method return. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
379 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
380 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
381 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
382 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
383 |
methodReturn(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
384 |
return methodReturn(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
385 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
386 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
387 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
388 |
* Create a {@code TypeAnnotationPosition} for a method return. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
389 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
390 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
391 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
392 |
public static TypeAnnotationPosition methodReturn(final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
393 |
return methodReturn(emptyPath, null, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
394 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
395 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
396 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
397 |
* Create a {@code TypeAnnotationPosition} for a method receiver. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
398 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
399 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
400 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
401 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
402 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
403 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
404 |
methodReceiver(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
405 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
406 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
407 |
return new TypeAnnotationPosition(TargetType.METHOD_RECEIVER, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
408 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
409 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
410 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
411 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
412 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
413 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
414 |
* Create a {@code TypeAnnotationPosition} for a method receiver. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
415 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
416 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
417 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
418 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
419 |
methodReceiver(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
420 |
return methodReceiver(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
421 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
422 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
423 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
424 |
* Create a {@code TypeAnnotationPosition} for a method receiver. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
425 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
426 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
427 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
428 |
public static TypeAnnotationPosition methodReceiver(final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
429 |
return methodReceiver(emptyPath, null, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
430 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
431 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
432 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
433 |
* Create a {@code TypeAnnotationPosition} for a method formal parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
434 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
435 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
436 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
437 |
* @param index The index of the parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
438 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
439 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
440 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
441 |
methodParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
442 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
443 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
444 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
445 |
return new TypeAnnotationPosition(TargetType.METHOD_FORMAL_PARAMETER, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
446 |
pos, parameter_index, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
447 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
448 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
449 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
450 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
451 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
452 |
* Create a {@code TypeAnnotationPosition} for a method formal parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
453 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
454 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
455 |
* @param index The index of the parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
456 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
457 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
458 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
459 |
methodParameter(final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
460 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
461 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
462 |
return methodParameter(emptyPath, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
463 |
parameter_index, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
464 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
465 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
466 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
467 |
* Create a {@code TypeAnnotationPosition} for a method formal parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
468 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
469 |
* @param index The index of the parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
470 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
471 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
472 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
473 |
methodParameter(final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
474 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
475 |
return methodParameter(null, parameter_index, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
476 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
477 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
478 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
479 |
* Create a {@code TypeAnnotationPosition} for a method formal parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
480 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
481 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
482 |
* @param index The index of the parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
483 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
484 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
485 |
methodParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
486 |
final int parameter_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
487 |
return methodParameter(location, null, parameter_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
488 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
489 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
490 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
491 |
* Create a {@code TypeAnnotationPosition} for a method reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
492 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
493 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
494 |
* @param onLambda The lambda for this method reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
495 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
496 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
497 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
498 |
methodRef(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
499 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
500 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
501 |
return new TypeAnnotationPosition(TargetType.METHOD_REFERENCE, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
502 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
503 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
504 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
505 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
506 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
507 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
508 |
* Create a {@code TypeAnnotationPosition} for a method reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
509 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
510 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
511 |
* @param onLambda The lambda for this method reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
512 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
513 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
514 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
515 |
methodRef(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
516 |
return methodRef(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
517 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
518 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
519 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
520 |
* Create a {@code TypeAnnotationPosition} for a constructor reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
521 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
522 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
523 |
* @param onLambda The lambda for this constructor reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
524 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
525 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
526 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
527 |
constructorRef(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
528 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
529 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
530 |
return new TypeAnnotationPosition(TargetType.CONSTRUCTOR_REFERENCE, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
531 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
532 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
533 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
534 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
535 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
536 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
537 |
* Create a {@code TypeAnnotationPosition} for a constructor reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
538 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
539 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
540 |
* @param onLambda The lambda for this constructor reference. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
541 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
542 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
543 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
544 |
constructorRef(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
545 |
return constructorRef(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
546 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
547 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
548 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
549 |
* Create a {@code TypeAnnotationPosition} for a field. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
550 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
551 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
552 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
553 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
554 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
555 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
556 |
field(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
557 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
558 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
559 |
return new TypeAnnotationPosition(TargetType.FIELD, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
560 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
561 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
562 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
563 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
564 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
565 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
566 |
* Create a {@code TypeAnnotationPosition} for a field. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
567 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
568 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
569 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
570 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
571 |
field(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
572 |
return field(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
573 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
574 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
575 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
576 |
* Create a {@code TypeAnnotationPosition} for a field. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
577 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
578 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
579 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
580 |
public static TypeAnnotationPosition field(final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
581 |
return field(emptyPath, null, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
582 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
583 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
584 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
585 |
* Create a {@code TypeAnnotationPosition} for a local variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
586 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
587 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
588 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
589 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
590 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
591 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
592 |
localVariable(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
593 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
594 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
595 |
return new TypeAnnotationPosition(TargetType.LOCAL_VARIABLE, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
596 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
597 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
598 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
599 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
600 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
601 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
602 |
* Create a {@code TypeAnnotationPosition} for a local variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
603 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
604 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
605 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
606 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
607 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
608 |
localVariable(final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
609 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
610 |
return localVariable(emptyPath, onLambda, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
611 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
612 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
613 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
614 |
* Create a {@code TypeAnnotationPosition} for a local variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
615 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
616 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
617 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
618 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
619 |
localVariable(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
620 |
return localVariable(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
621 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
622 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
623 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
624 |
* Create a {@code TypeAnnotationPosition} for an exception parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
625 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
626 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
627 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
628 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
629 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
630 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
631 |
exceptionParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
632 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
633 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
634 |
return new TypeAnnotationPosition(TargetType.EXCEPTION_PARAMETER, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
635 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
636 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
637 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
638 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
639 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
640 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
641 |
* Create a {@code TypeAnnotationPosition} for an exception parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
642 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
643 |
* @param onLambda The lambda for this parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
644 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
645 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
646 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
647 |
exceptionParameter(final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
648 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
649 |
return exceptionParameter(emptyPath, onLambda, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
650 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
651 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
652 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
653 |
* Create a {@code TypeAnnotationPosition} for an exception parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
654 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
655 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
656 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
657 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
658 |
exceptionParameter(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
659 |
return exceptionParameter(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
660 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
661 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
662 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
663 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
664 |
* Create a {@code TypeAnnotationPosition} for a resource variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
665 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
666 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
667 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
668 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
669 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
670 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
671 |
resourceVariable(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
672 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
673 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
674 |
return new TypeAnnotationPosition(TargetType.RESOURCE_VARIABLE, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
675 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
676 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
677 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
678 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
679 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
680 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
681 |
* Create a {@code TypeAnnotationPosition} for a resource variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
682 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
683 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
684 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
685 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
686 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
687 |
resourceVariable(final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
688 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
689 |
return resourceVariable(emptyPath, onLambda, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
690 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
691 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
692 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
693 |
* Create a {@code TypeAnnotationPosition} for a resource variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
694 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
695 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
696 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
697 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
698 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
699 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
700 |
resourceVariable(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
701 |
return resourceVariable(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
702 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
703 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
704 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
705 |
* Create a {@code TypeAnnotationPosition} for a new. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
706 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
707 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
708 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
709 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
710 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
711 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
712 |
newObj(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
713 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
714 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
715 |
return new TypeAnnotationPosition(TargetType.NEW, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
716 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
717 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
718 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
719 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
720 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
721 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
722 |
* Create a {@code TypeAnnotationPosition} for a new. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
723 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
724 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
725 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
726 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
727 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
728 |
public static TypeAnnotationPosition newObj(final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
729 |
return newObj(emptyPath, null, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
730 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
731 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
732 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
733 |
* Create a {@code TypeAnnotationPosition} for a new. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
734 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
735 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
736 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
737 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
738 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
739 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
740 |
newObj(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
741 |
return newObj(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
742 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
743 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
744 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
745 |
* Create a {@code TypeAnnotationPosition} for a class extension. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
746 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
747 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
748 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
749 |
* @param type_index The index of the interface. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
750 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
751 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
752 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
753 |
classExtends(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
754 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
755 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
756 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
757 |
return new TypeAnnotationPosition(TargetType.CLASS_EXTENDS, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
758 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
759 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
760 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
761 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
762 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
763 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
764 |
* Create a {@code TypeAnnotationPosition} for a class extension. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
765 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
766 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
767 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
768 |
* @param type_index The index of the interface. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
769 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
770 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
771 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
772 |
classExtends(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
773 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
774 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
775 |
return classExtends(location, onLambda, -1, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
776 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
777 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
778 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
779 |
* Create a {@code TypeAnnotationPosition} for a class extension. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
780 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
781 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
782 |
* @param type_index The index of the interface. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
783 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
784 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
785 |
classExtends(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
786 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
787 |
return classExtends(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
788 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
789 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
790 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
791 |
* Create a {@code TypeAnnotationPosition} for a class extension. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
792 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
793 |
* @param type_index The index of the interface. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
794 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
795 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
796 |
public static TypeAnnotationPosition classExtends(final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
797 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
798 |
return classExtends(emptyPath, null, type_index, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
799 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
800 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
801 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
802 |
* Create a {@code TypeAnnotationPosition} for a class extension. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
803 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
804 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
805 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
806 |
public static TypeAnnotationPosition classExtends(final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
807 |
return classExtends(-1, pos); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
808 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
809 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
810 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
811 |
* Create a {@code TypeAnnotationPosition} for an instanceof. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
812 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
813 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
814 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
815 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
816 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
817 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
818 |
instanceOf(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
819 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
820 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
821 |
return new TypeAnnotationPosition(TargetType.INSTANCEOF, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
822 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
823 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
824 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
825 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
826 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
827 |
* Create a {@code TypeAnnotationPosition} for an instanceof. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
828 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
829 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
830 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
831 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
832 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
833 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
834 |
instanceOf(final List<TypePathEntry> location) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
835 |
return instanceOf(location, null, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
836 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
837 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
838 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
839 |
* Create a {@code TypeAnnotationPosition} for a type cast. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
840 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
841 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
842 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
843 |
* @param type_index The index into an intersection type. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
844 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
845 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
846 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
847 |
typeCast(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
848 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
849 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
850 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
851 |
return new TypeAnnotationPosition(TargetType.CAST, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
852 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
853 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
854 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
855 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
856 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
857 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
858 |
* Create a {@code TypeAnnotationPosition} for a type cast. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
859 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
860 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
861 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
862 |
* @param type_index The index into an intersection type. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
863 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
864 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
865 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
866 |
typeCast(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
867 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
868 |
return typeCast(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
869 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
870 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
871 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
872 |
* Create a {@code TypeAnnotationPosition} for a method |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
873 |
* invocation type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
874 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
875 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
876 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
877 |
* @param type_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
878 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
879 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
880 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
881 |
methodInvocationTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
882 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
883 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
884 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
885 |
return new TypeAnnotationPosition(TargetType.METHOD_INVOCATION_TYPE_ARGUMENT, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
886 |
pos, Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
887 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
888 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
889 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
890 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
891 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
892 |
* Create a {@code TypeAnnotationPosition} for a method |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
893 |
* invocation type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
894 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
895 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
896 |
* @param type_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
897 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
898 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
899 |
methodInvocationTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
900 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
901 |
return methodInvocationTypeArg(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
902 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
903 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
904 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
905 |
* Create a {@code TypeAnnotationPosition} for a constructor |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
906 |
* invocation type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
907 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
908 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
909 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
910 |
* @param type_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
911 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
912 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
913 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
914 |
constructorInvocationTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
915 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
916 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
917 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
918 |
return new TypeAnnotationPosition(TargetType.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
919 |
pos, Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
920 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
921 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
922 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
923 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
924 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
925 |
* Create a {@code TypeAnnotationPosition} for a constructor |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
926 |
* invocation type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
927 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
928 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
929 |
* @param type_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
930 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
931 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
932 |
constructorInvocationTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
933 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
934 |
return constructorInvocationTypeArg(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
935 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
936 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
937 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
938 |
* Create a {@code TypeAnnotationPosition} for a type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
939 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
940 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
941 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
942 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
943 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
944 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
945 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
946 |
typeParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
947 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
948 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
949 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
950 |
return new TypeAnnotationPosition(TargetType.CLASS_TYPE_PARAMETER, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
951 |
parameter_index, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
952 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
953 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
954 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
955 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
956 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
957 |
* Create a {@code TypeAnnotationPosition} for a type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
958 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
959 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
960 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
961 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
962 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
963 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
964 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
965 |
typeParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
966 |
final int parameter_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
967 |
return typeParameter(location, null, parameter_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
968 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
969 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
970 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
971 |
* Create a {@code TypeAnnotationPosition} for a method type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
972 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
973 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
974 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
975 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
976 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
977 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
978 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
979 |
methodTypeParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
980 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
981 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
982 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
983 |
return new TypeAnnotationPosition(TargetType.METHOD_TYPE_PARAMETER, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
984 |
pos, parameter_index, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
985 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
986 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
987 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
988 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
989 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
990 |
* Create a {@code TypeAnnotationPosition} for a method type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
991 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
992 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
993 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
994 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
995 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
996 |
methodTypeParameter(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
997 |
final int parameter_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
998 |
return methodTypeParameter(location, null, parameter_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
999 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1000 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1001 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1002 |
* Create a {@code TypeAnnotationPosition} for a throws clause. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1003 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1004 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1005 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1006 |
* @param type_index The index of the exception. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1007 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1008 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1009 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1010 |
methodThrows(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1011 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1012 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1013 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1014 |
return new TypeAnnotationPosition(TargetType.THROWS, pos, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1015 |
Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1016 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1017 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1018 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1019 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1020 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1021 |
* Create a {@code TypeAnnotationPosition} for a throws clause. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1022 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1023 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1024 |
* @param type_index The index of the exception. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1025 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1026 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1027 |
methodThrows(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1028 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1029 |
return methodThrows(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1030 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1031 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1032 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1033 |
* Create a {@code TypeAnnotationPosition} for a method reference |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1034 |
* type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1035 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1036 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1037 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1038 |
* @param parameter_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1039 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1040 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1041 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1042 |
methodRefTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1043 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1044 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1045 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1046 |
return new TypeAnnotationPosition(TargetType.METHOD_REFERENCE_TYPE_ARGUMENT, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1047 |
pos, Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1048 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1049 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1050 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1051 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1052 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1053 |
* Create a {@code TypeAnnotationPosition} for a method reference |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1054 |
* type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1055 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1056 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1057 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1058 |
* @param parameter_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1059 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1060 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1061 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1062 |
methodRefTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1063 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1064 |
return methodRefTypeArg(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1065 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1066 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1067 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1068 |
* Create a {@code TypeAnnotationPosition} for a constructor reference |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1069 |
* type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1070 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1071 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1072 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1073 |
* @param parameter_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1074 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1075 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1076 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1077 |
constructorRefTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1078 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1079 |
final int type_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1080 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1081 |
return new TypeAnnotationPosition(TargetType.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1082 |
pos, Integer.MIN_VALUE, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1083 |
type_index, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1084 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1085 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1086 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1087 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1088 |
* Create a {@code TypeAnnotationPosition} for a constructor reference |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1089 |
* type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1090 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1091 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1092 |
* @param parameter_index The index of the type argument. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1093 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1094 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1095 |
constructorRefTypeArg(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1096 |
final int type_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1097 |
return constructorRefTypeArg(location, null, type_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1098 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1099 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1100 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1101 |
* Create a {@code TypeAnnotationPosition} for a type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1102 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1103 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1104 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1105 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1106 |
* @param bound_index The index of the type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1107 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1108 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1109 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1110 |
typeParameterBound(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1111 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1112 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1113 |
final int bound_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1114 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1115 |
return new TypeAnnotationPosition(TargetType.CLASS_TYPE_PARAMETER_BOUND, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1116 |
pos, parameter_index, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1117 |
Integer.MIN_VALUE, bound_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1118 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1119 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1120 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1121 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1122 |
* Create a {@code TypeAnnotationPosition} for a type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1123 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1124 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1125 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1126 |
* @param bound_index The index of the type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1127 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1128 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1129 |
typeParameterBound(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1130 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1131 |
final int bound_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1132 |
return typeParameterBound(location, null, parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1133 |
bound_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1134 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1135 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1136 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1137 |
* Create a {@code TypeAnnotationPosition} for a method type |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1138 |
* parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1139 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1140 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1141 |
* @param onLambda The lambda for this variable. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1142 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1143 |
* @param bound_index The index of the type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1144 |
* @param pos The position from the associated tree node. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1145 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1146 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1147 |
methodTypeParameterBound(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1148 |
final JCLambda onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1149 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1150 |
final int bound_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1151 |
final int pos) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1152 |
return new TypeAnnotationPosition(TargetType.METHOD_TYPE_PARAMETER_BOUND, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1153 |
pos, parameter_index, onLambda, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1154 |
Integer.MIN_VALUE, bound_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1155 |
location); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1156 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1157 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1158 |
/** |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1159 |
* Create a {@code TypeAnnotationPosition} for a method type |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1160 |
* parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1161 |
* |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1162 |
* @param location The type path. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1163 |
* @param parameter_index The index of the type parameter. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1164 |
* @param bound_index The index of the type parameter bound. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1165 |
*/ |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1166 |
public static TypeAnnotationPosition |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1167 |
methodTypeParameterBound(final List<TypePathEntry> location, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1168 |
final int parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1169 |
final int bound_index) { |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1170 |
return methodTypeParameterBound(location, null, parameter_index, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1171 |
bound_index, -1); |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1172 |
} |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1173 |
|
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1174 |
// Consider this deprecated on arrival. We eventually want to get |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1175 |
// rid of this value altogether. Do not use it for anything new. |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1176 |
public static final TypeAnnotationPosition unknown = |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1177 |
new TypeAnnotationPosition(TargetType.UNKNOWN, -1, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1178 |
Integer.MIN_VALUE, null, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1179 |
Integer.MIN_VALUE, Integer.MIN_VALUE, |
1297fbaf34fa
8033004: Make base TypeAnnotationPosition data immutable, create better methods for creating base TypeAnnotationPositions
emc
parents:
20249
diff
changeset
|
1180 |
emptyPath); |
3150 | 1181 |
} |