@@ -315,16 +315,34 @@ abstract class InterfaceType implements ParameterizedType {
315
315
/// Return the element representing the getter with the given [name] that is
316
316
/// declared in this class, or `null` if this class does not declare a getter
317
317
/// with the given name.
318
+ GetterElement ? getGetter (String name);
319
+
320
+ /// Return the element representing the getter with the given [name] that is
321
+ /// declared in this class, or `null` if this class does not declare a getter
322
+ /// with the given name.
323
+ @Deprecated ('Use getGetter instead' )
318
324
GetterElement ? getGetter2 (String name);
319
325
320
326
/// Return the element representing the method with the given [name] that is
321
327
/// declared in this class, or `null` if this class does not declare a method
322
328
/// with the given name.
329
+ MethodElement ? getMethod (String name);
330
+
331
+ /// Return the element representing the method with the given [name] that is
332
+ /// declared in this class, or `null` if this class does not declare a method
333
+ /// with the given name.
334
+ @Deprecated ('Use getMethod instead' )
323
335
MethodElement ? getMethod2 (String name);
324
336
325
337
/// Return the element representing the setter with the given [name] that is
326
338
/// declared in this class, or `null` if this class does not declare a setter
327
339
/// with the given name.
340
+ SetterElement ? getSetter (String name);
341
+
342
+ /// Return the element representing the setter with the given [name] that is
343
+ /// declared in this class, or `null` if this class does not declare a setter
344
+ /// with the given name.
345
+ @Deprecated ('Use getSetter instead' )
328
346
SetterElement ? getSetter2 (String name);
329
347
330
348
/// Return the element representing the constructor that results from looking
@@ -337,6 +355,19 @@ abstract class InterfaceType implements ParameterizedType {
337
355
/// <i>T<i>. Otherwise, if <i>q</i> is not defined or not accessible, a
338
356
/// NoSuchMethodException is thrown.
339
357
/// </blockquote>
358
+ ConstructorElement ? lookUpConstructor (String ? name, LibraryElement library);
359
+
360
+ /// Return the element representing the constructor that results from looking
361
+ /// up the constructor with the given [name] in this class with respect to the
362
+ /// given [library] , or `null` if the look up fails. The behavior of this
363
+ /// method is defined by the Dart Language Specification in section 12.11.1:
364
+ /// <blockquote>
365
+ /// If <i>e</i> is of the form <b>new</b> <i>T.id()</i> then let <i>q<i> be
366
+ /// the constructor <i>T.id</i>, otherwise let <i>q<i> be the constructor
367
+ /// <i>T<i>. Otherwise, if <i>q</i> is not defined or not accessible, a
368
+ /// NoSuchMethodException is thrown.
369
+ /// </blockquote>
370
+ @Deprecated ('Use lookUpConstructor instead' )
340
371
ConstructorElement ? lookUpConstructor2 (String ? name, LibraryElement library);
341
372
342
373
/// Return the getter with the given [name] .
@@ -349,6 +380,25 @@ abstract class InterfaceType implements ParameterizedType {
349
380
///
350
381
/// If [recoveryStatic] is `true` , then static getters of the class,
351
382
/// and its superclasses are considered. Clients should not use it.
383
+ GetterElement ? lookUpGetter (
384
+ String name,
385
+ LibraryElement library, {
386
+ bool concrete = false ,
387
+ bool inherited = false ,
388
+ bool recoveryStatic = false ,
389
+ });
390
+
391
+ /// Return the getter with the given [name] .
392
+ ///
393
+ /// If [concrete] is `true` , then the concrete implementation is returned,
394
+ /// from this type, or its superclass.
395
+ ///
396
+ /// If [inherited] is `true` , then only getters from the superclass are
397
+ /// considered.
398
+ ///
399
+ /// If [recoveryStatic] is `true` , then static getters of the class,
400
+ /// and its superclasses are considered. Clients should not use it.
401
+ @Deprecated ('Use lookUpGetter instead' )
352
402
GetterElement ? lookUpGetter3 (
353
403
String name,
354
404
LibraryElement library, {
@@ -367,6 +417,25 @@ abstract class InterfaceType implements ParameterizedType {
367
417
///
368
418
/// If [recoveryStatic] is `true` , then static methods of the class,
369
419
/// and its superclasses are considered. Clients should not use it.
420
+ MethodElement ? lookUpMethod (
421
+ String name,
422
+ LibraryElement library, {
423
+ bool concrete = false ,
424
+ bool inherited = false ,
425
+ bool recoveryStatic = false ,
426
+ });
427
+
428
+ /// Return the method with the given [name] .
429
+ ///
430
+ /// If [concrete] is `true` , then the concrete implementation is returned,
431
+ /// from this type, or its superclass.
432
+ ///
433
+ /// If [inherited] is `true` , then only methods from the superclass are
434
+ /// considered.
435
+ ///
436
+ /// If [recoveryStatic] is `true` , then static methods of the class,
437
+ /// and its superclasses are considered. Clients should not use it.
438
+ @Deprecated ('Use lookUpMethod instead' )
370
439
MethodElement ? lookUpMethod3 (
371
440
String name,
372
441
LibraryElement library, {
@@ -385,6 +454,25 @@ abstract class InterfaceType implements ParameterizedType {
385
454
///
386
455
/// If [recoveryStatic] is `true` , then static setters of the class,
387
456
/// and its superclasses are considered. Clients should not use it.
457
+ SetterElement ? lookUpSetter (
458
+ String name,
459
+ LibraryElement library, {
460
+ bool concrete = false ,
461
+ bool inherited = false ,
462
+ bool recoveryStatic = false ,
463
+ });
464
+
465
+ /// Return the setter with the given [name] .
466
+ ///
467
+ /// If [concrete] is `true` , then the concrete implementation is returned,
468
+ /// from this type, or its superclass.
469
+ ///
470
+ /// If [inherited] is `true` , then only setters from the superclass are
471
+ /// considered.
472
+ ///
473
+ /// If [recoveryStatic] is `true` , then static setters of the class,
474
+ /// and its superclasses are considered. Clients should not use it.
475
+ @Deprecated ('Use lookUpSetter instead' )
388
476
SetterElement ? lookUpSetter3 (
389
477
String name,
390
478
LibraryElement library, {
0 commit comments