OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library fasta.analyzer.mock_element; | 5 library fasta.analyzer.mock_element; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
9 import 'package:analyzer/dart/element/type.dart'; | 9 import 'package:analyzer/dart/element/type.dart'; |
10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
11 import 'package:front_end/src/fasta/builder/builder.dart' show Builder; | 11 import 'package:front_end/src/fasta/builder/builder.dart' show Builder; |
12 import 'package:front_end/src/fasta/errors.dart' show internalError; | 12 |
| 13 import 'package:front_end/src/fasta/deprecated_problems.dart' |
| 14 show deprecated_internalProblem; |
13 | 15 |
14 abstract class MockElement extends Builder implements Element, LocalElement { | 16 abstract class MockElement extends Builder implements Element, LocalElement { |
15 @override | 17 @override |
16 final ElementKind kind; | 18 final ElementKind kind; |
17 | 19 |
18 MockElement(this.kind) : super(null, -1, null); | 20 MockElement(this.kind) : super(null, -1, null); |
19 | 21 |
20 @override | 22 @override |
21 get librarySource => internalError("not supported."); | 23 get librarySource => deprecated_internalProblem("not supported."); |
22 | 24 |
23 @override | 25 @override |
24 get source => internalError("not supported."); | 26 get source => deprecated_internalProblem("not supported."); |
25 | 27 |
26 @override | 28 @override |
27 get context => internalError("not supported."); | 29 get context => deprecated_internalProblem("not supported."); |
28 | 30 |
29 @override | 31 @override |
30 String get displayName => internalError("not supported."); | 32 String get displayName => deprecated_internalProblem("not supported."); |
31 | 33 |
32 @override | 34 @override |
33 String get documentationComment => internalError("not supported."); | 35 String get documentationComment => |
| 36 deprecated_internalProblem("not supported."); |
34 | 37 |
35 @override | 38 @override |
36 Element get enclosingElement => internalError("not supported."); | 39 Element get enclosingElement => deprecated_internalProblem("not supported."); |
37 | 40 |
38 @override | 41 @override |
39 int get id => internalError("not supported."); | 42 int get id => deprecated_internalProblem("not supported."); |
40 | 43 |
41 @override | 44 @override |
42 bool get isDeprecated => internalError("not supported."); | 45 bool get isDeprecated => deprecated_internalProblem("not supported."); |
43 | 46 |
44 @override | 47 @override |
45 bool get isFactory => internalError("not supported."); | 48 bool get isFactory => deprecated_internalProblem("not supported."); |
46 | 49 |
47 @override | 50 @override |
48 bool get isJS => internalError("not supported."); | 51 bool get isJS => deprecated_internalProblem("not supported."); |
49 | 52 |
50 @override | 53 @override |
51 bool get isOverride => internalError("not supported."); | 54 bool get isOverride => deprecated_internalProblem("not supported."); |
52 | 55 |
53 @override | 56 @override |
54 bool get isPrivate => internalError("not supported."); | 57 bool get isPrivate => deprecated_internalProblem("not supported."); |
55 | 58 |
56 @override | 59 @override |
57 bool get isProtected => internalError("not supported."); | 60 bool get isProtected => deprecated_internalProblem("not supported."); |
58 | 61 |
59 @override | 62 @override |
60 bool get isPublic => internalError("not supported."); | 63 bool get isPublic => deprecated_internalProblem("not supported."); |
61 | 64 |
62 @override | 65 @override |
63 bool get isRequired => internalError("not supported."); | 66 bool get isRequired => deprecated_internalProblem("not supported."); |
64 | 67 |
65 @override | 68 @override |
66 bool get isSynthetic => internalError("not supported."); | 69 bool get isSynthetic => deprecated_internalProblem("not supported."); |
67 | 70 |
68 @override | 71 @override |
69 LibraryElement get library => internalError("not supported."); | 72 LibraryElement get library => deprecated_internalProblem("not supported."); |
70 | 73 |
71 @override | 74 @override |
72 get location => internalError("not supported."); | 75 get location => deprecated_internalProblem("not supported."); |
73 | 76 |
74 @override | 77 @override |
75 get metadata => internalError("not supported."); | 78 get metadata => deprecated_internalProblem("not supported."); |
76 | 79 |
77 @override | 80 @override |
78 String get name => internalError("not supported."); | 81 String get name => deprecated_internalProblem("not supported."); |
79 | 82 |
80 @override | 83 @override |
81 String get fullNameForErrors => name; | 84 String get fullNameForErrors => name; |
82 | 85 |
83 @override | 86 @override |
84 int get nameLength => internalError("not supported."); | 87 int get nameLength => deprecated_internalProblem("not supported."); |
85 | 88 |
86 @override | 89 @override |
87 int get nameOffset => -1; | 90 int get nameOffset => -1; |
88 | 91 |
89 @override | 92 @override |
90 get unit => internalError("not supported."); | 93 get unit => deprecated_internalProblem("not supported."); |
91 | 94 |
92 @override | 95 @override |
93 accept<T>(visitor) => internalError("not supported."); | 96 accept<T>(visitor) => deprecated_internalProblem("not supported."); |
94 | 97 |
95 @override | 98 @override |
96 String computeDocumentationComment() => internalError("not supported."); | 99 String computeDocumentationComment() => |
| 100 deprecated_internalProblem("not supported."); |
97 | 101 |
98 @override | 102 @override |
99 computeNode() => internalError("not supported."); | 103 computeNode() => deprecated_internalProblem("not supported."); |
100 | 104 |
101 @override | 105 @override |
102 getAncestor<E>(predicate) => internalError("not supported."); | 106 getAncestor<E>(predicate) => deprecated_internalProblem("not supported."); |
103 | 107 |
104 @override | 108 @override |
105 String getExtendedDisplayName(String shortName) { | 109 String getExtendedDisplayName(String shortName) { |
106 return internalError("not supported."); | 110 return deprecated_internalProblem("not supported."); |
107 } | 111 } |
108 | 112 |
109 @override | 113 @override |
110 bool isAccessibleIn(LibraryElement library) { | 114 bool isAccessibleIn(LibraryElement library) { |
111 return internalError("not supported."); | 115 return deprecated_internalProblem("not supported."); |
112 } | 116 } |
113 | 117 |
114 @override | 118 @override |
115 void visitChildren(visitor) => internalError("not supported."); | 119 void visitChildren(visitor) => deprecated_internalProblem("not supported."); |
116 | 120 |
117 String get uri => internalError("not supported."); | 121 String get uri => deprecated_internalProblem("not supported."); |
118 | 122 |
119 int get uriEnd => internalError("not supported."); | 123 int get uriEnd => deprecated_internalProblem("not supported."); |
120 | 124 |
121 int get uriOffset => internalError("not supported."); | 125 int get uriOffset => deprecated_internalProblem("not supported."); |
122 | 126 |
123 List<ParameterElement> get parameters => internalError("not supported."); | 127 List<ParameterElement> get parameters => |
| 128 deprecated_internalProblem("not supported."); |
124 | 129 |
125 List<FunctionElement> get functions => internalError("not supported."); | 130 List<FunctionElement> get functions => |
| 131 deprecated_internalProblem("not supported."); |
126 | 132 |
127 bool get hasImplicitReturnType => internalError("not supported."); | 133 bool get hasImplicitReturnType => |
| 134 deprecated_internalProblem("not supported."); |
128 | 135 |
129 bool get isAbstract => internalError("not supported."); | 136 bool get isAbstract => deprecated_internalProblem("not supported."); |
130 | 137 |
131 bool get isAsynchronous => internalError("not supported."); | 138 bool get isAsynchronous => deprecated_internalProblem("not supported."); |
132 | 139 |
133 bool get isExternal => internalError("not supported."); | 140 bool get isExternal => deprecated_internalProblem("not supported."); |
134 | 141 |
135 bool get isGenerator => internalError("not supported."); | 142 bool get isGenerator => deprecated_internalProblem("not supported."); |
136 | 143 |
137 bool get isOperator => internalError("not supported."); | 144 bool get isOperator => deprecated_internalProblem("not supported."); |
138 | 145 |
139 @override | 146 @override |
140 bool get isStatic => internalError("not supported."); | 147 bool get isStatic => deprecated_internalProblem("not supported."); |
141 | 148 |
142 bool get isSynchronous => internalError("not supported."); | 149 bool get isSynchronous => deprecated_internalProblem("not supported."); |
143 | 150 |
144 @override | 151 @override |
145 get visibleRange => internalError("not supported."); | 152 get visibleRange => deprecated_internalProblem("not supported."); |
146 | 153 |
147 bool get hasImplicitType => internalError("not supported."); | 154 bool get hasImplicitType => deprecated_internalProblem("not supported."); |
148 | 155 |
149 FunctionElement get initializer => internalError("not supported."); | 156 FunctionElement get initializer => |
| 157 deprecated_internalProblem("not supported."); |
150 | 158 |
151 @override | 159 @override |
152 bool get isConst => internalError("not supported."); | 160 bool get isConst => deprecated_internalProblem("not supported."); |
153 | 161 |
154 @override | 162 @override |
155 bool get isFinal => internalError("not supported."); | 163 bool get isFinal => deprecated_internalProblem("not supported."); |
156 | 164 |
157 bool get isPotentiallyMutatedInClosure => internalError("not supported."); | 165 bool get isPotentiallyMutatedInClosure => |
| 166 deprecated_internalProblem("not supported."); |
158 | 167 |
159 bool get isPotentiallyMutatedInScope => internalError("not supported."); | 168 bool get isPotentiallyMutatedInScope => |
| 169 deprecated_internalProblem("not supported."); |
160 } | 170 } |
161 | 171 |
162 abstract class MockLibraryElement extends MockElement | 172 abstract class MockLibraryElement extends MockElement |
163 implements LibraryElement { | 173 implements LibraryElement { |
164 MockLibraryElement() : super(ElementKind.LIBRARY); | 174 MockLibraryElement() : super(ElementKind.LIBRARY); |
165 | 175 |
166 @override | 176 @override |
167 CompilationUnitElement get definingCompilationUnit { | 177 CompilationUnitElement get definingCompilationUnit { |
168 return internalError("not supported."); | 178 return deprecated_internalProblem("not supported."); |
169 } | 179 } |
170 | 180 |
171 @override | 181 @override |
172 FunctionElement get entryPoint => internalError("not supported."); | 182 FunctionElement get entryPoint => |
| 183 deprecated_internalProblem("not supported."); |
173 | 184 |
174 @override | 185 @override |
175 List<LibraryElement> get exportedLibraries { | 186 List<LibraryElement> get exportedLibraries { |
176 return internalError("not supported."); | 187 return deprecated_internalProblem("not supported."); |
177 } | 188 } |
178 | 189 |
179 @override | 190 @override |
180 get exportNamespace => internalError("not supported."); | 191 get exportNamespace => deprecated_internalProblem("not supported."); |
181 | 192 |
182 @override | 193 @override |
183 get exports => internalError("not supported."); | 194 get exports => deprecated_internalProblem("not supported."); |
184 | 195 |
185 @override | 196 @override |
186 bool get hasExtUri => internalError("not supported."); | 197 bool get hasExtUri => deprecated_internalProblem("not supported."); |
187 | 198 |
188 @override | 199 @override |
189 bool get hasLoadLibraryFunction => internalError("not supported."); | 200 bool get hasLoadLibraryFunction => |
| 201 deprecated_internalProblem("not supported."); |
190 | 202 |
191 @override | 203 @override |
192 String get identifier => internalError("not supported."); | 204 String get identifier => deprecated_internalProblem("not supported."); |
193 | 205 |
194 @override | 206 @override |
195 List<LibraryElement> get importedLibraries { | 207 List<LibraryElement> get importedLibraries { |
196 return internalError("not supported."); | 208 return deprecated_internalProblem("not supported."); |
197 } | 209 } |
198 | 210 |
199 @override | 211 @override |
200 get imports => internalError("not supported."); | 212 get imports => deprecated_internalProblem("not supported."); |
201 | 213 |
202 @override | 214 @override |
203 bool get isBrowserApplication => internalError("not supported."); | 215 bool get isBrowserApplication => deprecated_internalProblem("not supported."); |
204 | 216 |
205 @override | 217 @override |
206 bool get isDartAsync => internalError("not supported."); | 218 bool get isDartAsync => deprecated_internalProblem("not supported."); |
207 | 219 |
208 @override | 220 @override |
209 bool get isDartCore => internalError("not supported."); | 221 bool get isDartCore => deprecated_internalProblem("not supported."); |
210 | 222 |
211 @override | 223 @override |
212 bool get isInSdk => internalError("not supported."); | 224 bool get isInSdk => deprecated_internalProblem("not supported."); |
213 | 225 |
214 @override | 226 @override |
215 List<LibraryElement> get libraryCycle => internalError("not supported."); | 227 List<LibraryElement> get libraryCycle => |
| 228 deprecated_internalProblem("not supported."); |
216 | 229 |
217 @override | 230 @override |
218 FunctionElement get loadLibraryFunction => internalError("not supported."); | 231 FunctionElement get loadLibraryFunction => |
| 232 deprecated_internalProblem("not supported."); |
219 | 233 |
220 @override | 234 @override |
221 List<CompilationUnitElement> get parts => internalError("not supported."); | 235 List<CompilationUnitElement> get parts => |
| 236 deprecated_internalProblem("not supported."); |
222 | 237 |
223 @override | 238 @override |
224 List<PrefixElement> get prefixes => internalError("not supported."); | 239 List<PrefixElement> get prefixes => |
| 240 deprecated_internalProblem("not supported."); |
225 | 241 |
226 @override | 242 @override |
227 get publicNamespace => internalError("not supported."); | 243 get publicNamespace => deprecated_internalProblem("not supported."); |
228 | 244 |
229 @override | 245 @override |
230 List<CompilationUnitElement> get units => internalError("not supported."); | 246 List<CompilationUnitElement> get units => |
| 247 deprecated_internalProblem("not supported."); |
231 | 248 |
232 @override | 249 @override |
233 getImportsWithPrefix(PrefixElement prefix) { | 250 getImportsWithPrefix(PrefixElement prefix) { |
234 return internalError("not supported."); | 251 return deprecated_internalProblem("not supported."); |
235 } | 252 } |
236 | 253 |
237 @override | 254 @override |
238 ClassElement getType(String className) => internalError("not supported."); | 255 ClassElement getType(String className) => |
| 256 deprecated_internalProblem("not supported."); |
239 } | 257 } |
240 | 258 |
241 abstract class MockCompilationUnitElement extends MockElement | 259 abstract class MockCompilationUnitElement extends MockElement |
242 implements CompilationUnitElement { | 260 implements CompilationUnitElement { |
243 MockCompilationUnitElement() : super(ElementKind.COMPILATION_UNIT); | 261 MockCompilationUnitElement() : super(ElementKind.COMPILATION_UNIT); |
244 | 262 |
245 @override | 263 @override |
246 List<PropertyAccessorElement> get accessors { | 264 List<PropertyAccessorElement> get accessors { |
247 return internalError("not supported."); | 265 return deprecated_internalProblem("not supported."); |
248 } | 266 } |
249 | 267 |
250 @override | 268 @override |
251 LibraryElement get enclosingElement => internalError("not supported."); | 269 LibraryElement get enclosingElement => |
| 270 deprecated_internalProblem("not supported."); |
252 | 271 |
253 @override | 272 @override |
254 List<ClassElement> get enums => internalError("not supported."); | 273 List<ClassElement> get enums => deprecated_internalProblem("not supported."); |
255 | 274 |
256 @override | 275 @override |
257 List<FunctionElement> get functions => internalError("not supported."); | 276 List<FunctionElement> get functions => |
| 277 deprecated_internalProblem("not supported."); |
258 | 278 |
259 @override | 279 @override |
260 List<FunctionTypeAliasElement> get functionTypeAliases { | 280 List<FunctionTypeAliasElement> get functionTypeAliases { |
261 return internalError("not supported."); | 281 return deprecated_internalProblem("not supported."); |
262 } | 282 } |
263 | 283 |
264 @override | 284 @override |
265 bool get hasLoadLibraryFunction => internalError("not supported."); | 285 bool get hasLoadLibraryFunction => |
| 286 deprecated_internalProblem("not supported."); |
266 | 287 |
267 @override | 288 @override |
268 LineInfo get lineInfo => internalError("not supported."); | 289 LineInfo get lineInfo => deprecated_internalProblem("not supported."); |
269 | 290 |
270 @override | 291 @override |
271 List<TopLevelVariableElement> get topLevelVariables { | 292 List<TopLevelVariableElement> get topLevelVariables { |
272 return internalError("not supported."); | 293 return deprecated_internalProblem("not supported."); |
273 } | 294 } |
274 | 295 |
275 @override | 296 @override |
276 List<ClassElement> get types => internalError("not supported."); | 297 List<ClassElement> get types => deprecated_internalProblem("not supported."); |
277 | 298 |
278 @override | 299 @override |
279 ClassElement getEnum(String name) => internalError("not supported."); | 300 ClassElement getEnum(String name) => |
| 301 deprecated_internalProblem("not supported."); |
280 | 302 |
281 @override | 303 @override |
282 ClassElement getType(String name) => internalError("not supported."); | 304 ClassElement getType(String name) => |
| 305 deprecated_internalProblem("not supported."); |
283 | 306 |
284 @override | 307 @override |
285 CompilationUnit computeNode() => internalError("not supported."); | 308 CompilationUnit computeNode() => deprecated_internalProblem("not supported."); |
286 } | 309 } |
287 | 310 |
288 abstract class MockClassElement extends MockElement implements ClassElement { | 311 abstract class MockClassElement extends MockElement implements ClassElement { |
289 MockClassElement() : super(ElementKind.CLASS); | 312 MockClassElement() : super(ElementKind.CLASS); |
290 | 313 |
291 List<PropertyAccessorElement> get accessors { | 314 List<PropertyAccessorElement> get accessors { |
292 return internalError("not supported."); | 315 return deprecated_internalProblem("not supported."); |
293 } | 316 } |
294 | 317 |
295 @override | 318 @override |
296 get allSupertypes => internalError("not supported."); | 319 get allSupertypes => deprecated_internalProblem("not supported."); |
297 | 320 |
298 @override | 321 @override |
299 List<ConstructorElement> get constructors => internalError("not supported."); | 322 List<ConstructorElement> get constructors => |
| 323 deprecated_internalProblem("not supported."); |
300 | 324 |
301 @override | 325 @override |
302 List<FieldElement> get fields => internalError("not supported."); | 326 List<FieldElement> get fields => deprecated_internalProblem("not supported."); |
303 | 327 |
304 @override | 328 @override |
305 bool get hasNonFinalField => internalError("not supported."); | 329 bool get hasNonFinalField => deprecated_internalProblem("not supported."); |
306 | 330 |
307 @override | 331 @override |
308 bool get hasReferenceToSuper => internalError("not supported."); | 332 bool get hasReferenceToSuper => deprecated_internalProblem("not supported."); |
309 | 333 |
310 @override | 334 @override |
311 bool get hasStaticMember => internalError("not supported."); | 335 bool get hasStaticMember => deprecated_internalProblem("not supported."); |
312 | 336 |
313 @override | 337 @override |
314 get interfaces => internalError("not supported."); | 338 get interfaces => deprecated_internalProblem("not supported."); |
315 | 339 |
316 @override | 340 @override |
317 bool get isAbstract => internalError("not supported."); | 341 bool get isAbstract => deprecated_internalProblem("not supported."); |
318 | 342 |
319 @override | 343 @override |
320 bool get isEnum => internalError("not supported."); | 344 bool get isEnum => deprecated_internalProblem("not supported."); |
321 | 345 |
322 @override | 346 @override |
323 bool get isMixinApplication => internalError("not supported."); | 347 bool get isMixinApplication => deprecated_internalProblem("not supported."); |
324 | 348 |
325 @override | 349 @override |
326 bool get isOrInheritsProxy => internalError("not supported."); | 350 bool get isOrInheritsProxy => deprecated_internalProblem("not supported."); |
327 | 351 |
328 @override | 352 @override |
329 bool get isProxy => internalError("not supported."); | 353 bool get isProxy => deprecated_internalProblem("not supported."); |
330 | 354 |
331 @override | 355 @override |
332 bool get isValidMixin => internalError("not supported."); | 356 bool get isValidMixin => deprecated_internalProblem("not supported."); |
333 | 357 |
334 @override | 358 @override |
335 get typeParameters => internalError("not supported."); | 359 get typeParameters => deprecated_internalProblem("not supported."); |
336 | 360 |
337 @override | 361 @override |
338 List<MethodElement> get methods => internalError("not supported."); | 362 List<MethodElement> get methods => |
| 363 deprecated_internalProblem("not supported."); |
339 | 364 |
340 @override | 365 @override |
341 get mixins => internalError("not supported."); | 366 get mixins => deprecated_internalProblem("not supported."); |
342 | 367 |
343 @override | 368 @override |
344 get supertype => internalError("not supported."); | 369 get supertype => deprecated_internalProblem("not supported."); |
345 | 370 |
346 @override | 371 @override |
347 ConstructorElement get unnamedConstructor => internalError("not supported."); | 372 ConstructorElement get unnamedConstructor => |
| 373 deprecated_internalProblem("not supported."); |
348 | 374 |
349 @override | 375 @override |
350 FieldElement getField(String name) => internalError("not supported."); | 376 FieldElement getField(String name) => |
| 377 deprecated_internalProblem("not supported."); |
351 | 378 |
352 @override | 379 @override |
353 PropertyAccessorElement getGetter(String name) { | 380 PropertyAccessorElement getGetter(String name) { |
354 return internalError("not supported."); | 381 return deprecated_internalProblem("not supported."); |
355 } | 382 } |
356 | 383 |
357 @override | 384 @override |
358 MethodElement getMethod(String name) => internalError("not supported."); | 385 MethodElement getMethod(String name) => |
| 386 deprecated_internalProblem("not supported."); |
359 | 387 |
360 @override | 388 @override |
361 ConstructorElement getNamedConstructor(String name) { | 389 ConstructorElement getNamedConstructor(String name) { |
362 return internalError("not supported."); | 390 return deprecated_internalProblem("not supported."); |
363 } | 391 } |
364 | 392 |
365 @override | 393 @override |
366 PropertyAccessorElement getSetter(String name) { | 394 PropertyAccessorElement getSetter(String name) { |
367 return internalError("not supported."); | 395 return deprecated_internalProblem("not supported."); |
368 } | 396 } |
369 | 397 |
370 @override | 398 @override |
371 bool isSuperConstructorAccessible(ConstructorElement constructor) { | 399 bool isSuperConstructorAccessible(ConstructorElement constructor) { |
372 return internalError("not supported."); | 400 return deprecated_internalProblem("not supported."); |
373 } | 401 } |
374 | 402 |
375 @override | 403 @override |
376 MethodElement lookUpConcreteMethod( | 404 MethodElement lookUpConcreteMethod( |
377 String methodName, LibraryElement library) { | 405 String methodName, LibraryElement library) { |
378 return internalError("not supported."); | 406 return deprecated_internalProblem("not supported."); |
379 } | 407 } |
380 | 408 |
381 @override | 409 @override |
382 PropertyAccessorElement lookUpGetter( | 410 PropertyAccessorElement lookUpGetter( |
383 String getterName, LibraryElement library) { | 411 String getterName, LibraryElement library) { |
384 return internalError("not supported."); | 412 return deprecated_internalProblem("not supported."); |
385 } | 413 } |
386 | 414 |
387 @override | 415 @override |
388 PropertyAccessorElement lookUpInheritedConcreteGetter( | 416 PropertyAccessorElement lookUpInheritedConcreteGetter( |
389 String getterName, LibraryElement library) { | 417 String getterName, LibraryElement library) { |
390 return internalError("not supported."); | 418 return deprecated_internalProblem("not supported."); |
391 } | 419 } |
392 | 420 |
393 @override | 421 @override |
394 MethodElement lookUpInheritedConcreteMethod( | 422 MethodElement lookUpInheritedConcreteMethod( |
395 String methodName, LibraryElement library) { | 423 String methodName, LibraryElement library) { |
396 return internalError("not supported."); | 424 return deprecated_internalProblem("not supported."); |
397 } | 425 } |
398 | 426 |
399 @override | 427 @override |
400 PropertyAccessorElement lookUpInheritedConcreteSetter( | 428 PropertyAccessorElement lookUpInheritedConcreteSetter( |
401 String setterName, LibraryElement library) { | 429 String setterName, LibraryElement library) { |
402 return internalError("not supported."); | 430 return deprecated_internalProblem("not supported."); |
403 } | 431 } |
404 | 432 |
405 @override | 433 @override |
406 MethodElement lookUpInheritedMethod( | 434 MethodElement lookUpInheritedMethod( |
407 String methodName, LibraryElement library) { | 435 String methodName, LibraryElement library) { |
408 return internalError("not supported."); | 436 return deprecated_internalProblem("not supported."); |
409 } | 437 } |
410 | 438 |
411 @override | 439 @override |
412 MethodElement lookUpMethod(String methodName, LibraryElement library) { | 440 MethodElement lookUpMethod(String methodName, LibraryElement library) { |
413 return internalError("not supported."); | 441 return deprecated_internalProblem("not supported."); |
414 } | 442 } |
415 | 443 |
416 @override | 444 @override |
417 PropertyAccessorElement lookUpSetter( | 445 PropertyAccessorElement lookUpSetter( |
418 String setterName, LibraryElement library) { | 446 String setterName, LibraryElement library) { |
419 return internalError("not supported."); | 447 return deprecated_internalProblem("not supported."); |
420 } | 448 } |
421 | 449 |
422 @override | 450 @override |
423 NamedCompilationUnitMember computeNode() => internalError("not supported."); | 451 NamedCompilationUnitMember computeNode() => |
| 452 deprecated_internalProblem("not supported."); |
424 | 453 |
425 @override | 454 @override |
426 InterfaceType get type => internalError("not supported."); | 455 InterfaceType get type => deprecated_internalProblem("not supported."); |
427 } | 456 } |
428 | 457 |
429 abstract class MockFunctionElement extends MockElement | 458 abstract class MockFunctionElement extends MockElement |
430 implements FunctionElement { | 459 implements FunctionElement { |
431 MockFunctionElement() : super(ElementKind.FUNCTION); | 460 MockFunctionElement() : super(ElementKind.FUNCTION); |
432 | 461 |
433 @override | 462 @override |
434 bool get isEntryPoint => internalError("not supported."); | 463 bool get isEntryPoint => deprecated_internalProblem("not supported."); |
435 | 464 |
436 @override | 465 @override |
437 get typeParameters => internalError("not supported."); | 466 get typeParameters => deprecated_internalProblem("not supported."); |
438 | 467 |
439 @override | 468 @override |
440 FunctionType get type => internalError("not supported."); | 469 FunctionType get type => deprecated_internalProblem("not supported."); |
441 | 470 |
442 @override | 471 @override |
443 DartType get returnType => internalError("not supported."); | 472 DartType get returnType => deprecated_internalProblem("not supported."); |
444 | 473 |
445 @override | 474 @override |
446 FunctionDeclaration computeNode() => internalError("not supported."); | 475 FunctionDeclaration computeNode() => |
| 476 deprecated_internalProblem("not supported."); |
447 } | 477 } |
448 | 478 |
449 abstract class MockFunctionTypeAliasElement extends MockElement | 479 abstract class MockFunctionTypeAliasElement extends MockElement |
450 implements FunctionTypeAliasElement { | 480 implements FunctionTypeAliasElement { |
451 MockFunctionTypeAliasElement() : super(ElementKind.FUNCTION_TYPE_ALIAS); | 481 MockFunctionTypeAliasElement() : super(ElementKind.FUNCTION_TYPE_ALIAS); |
452 | 482 |
453 @override | 483 @override |
454 CompilationUnitElement get enclosingElement { | 484 CompilationUnitElement get enclosingElement { |
455 return internalError("not supported."); | 485 return deprecated_internalProblem("not supported."); |
456 } | 486 } |
457 | 487 |
458 @override | 488 @override |
459 TypeAlias computeNode() => internalError("not supported."); | 489 TypeAlias computeNode() => deprecated_internalProblem("not supported."); |
460 } | 490 } |
461 | 491 |
462 abstract class MockParameterElement extends MockElement | 492 abstract class MockParameterElement extends MockElement |
463 implements ParameterElement { | 493 implements ParameterElement { |
464 MockParameterElement() : super(ElementKind.PARAMETER); | 494 MockParameterElement() : super(ElementKind.PARAMETER); |
465 | 495 |
466 @override | 496 @override |
467 String get defaultValueCode => internalError("not supported."); | 497 String get defaultValueCode => deprecated_internalProblem("not supported."); |
468 | 498 |
469 @override | 499 @override |
470 bool get isCovariant => internalError("not supported."); | 500 bool get isCovariant => deprecated_internalProblem("not supported."); |
471 | 501 |
472 @override | 502 @override |
473 bool get isInitializingFormal => internalError("not supported."); | 503 bool get isInitializingFormal => deprecated_internalProblem("not supported."); |
474 | 504 |
475 @override | 505 @override |
476 get parameterKind => internalError("not supported."); | 506 get parameterKind => deprecated_internalProblem("not supported."); |
477 | 507 |
478 @override | 508 @override |
479 List<ParameterElement> get parameters => internalError("not supported."); | 509 List<ParameterElement> get parameters => |
| 510 deprecated_internalProblem("not supported."); |
480 | 511 |
481 @override | 512 @override |
482 get type => null; | 513 get type => null; |
483 | 514 |
484 @override | 515 @override |
485 get typeParameters => internalError("not supported."); | 516 get typeParameters => deprecated_internalProblem("not supported."); |
486 | 517 |
487 @override | 518 @override |
488 get constantValue => internalError("not supported."); | 519 get constantValue => deprecated_internalProblem("not supported."); |
489 | 520 |
490 @override | 521 @override |
491 computeConstantValue() => internalError("not supported."); | 522 computeConstantValue() => deprecated_internalProblem("not supported."); |
492 | 523 |
493 @override | 524 @override |
494 void appendToWithoutDelimiters(StringBuffer buffer) { | 525 void appendToWithoutDelimiters(StringBuffer buffer) { |
495 return internalError("not supported."); | 526 return deprecated_internalProblem("not supported."); |
496 } | 527 } |
497 | 528 |
498 @override | 529 @override |
499 FormalParameter computeNode() => internalError("not supported."); | 530 FormalParameter computeNode() => deprecated_internalProblem("not supported."); |
500 } | 531 } |
OLD | NEW |