Skip to content

Commit 801b545

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove V1 lookupXyz methods.
Change-Id: I5b4677130c06c5fd7db8f40c03338bd816ae6fda Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423166 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 04ec005 commit 801b545

File tree

3 files changed

+0
-443
lines changed

3 files changed

+0
-443
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,9 +2980,6 @@ package:analyzer/dart/element/element.dart:
29802980
getGetter (method: PropertyAccessorElement? Function(String))
29812981
getMethod (method: MethodElement? Function(String))
29822982
getSetter (method: PropertyAccessorElement? Function(String))
2983-
lookUpGetter (method: PropertyAccessorElement? Function({required LibraryElement library, required String name}))
2984-
lookUpMethod (method: MethodElement? Function({required LibraryElement library, required String name}))
2985-
lookUpSetter (method: PropertyAccessorElement? Function({required LibraryElement library, required String name}))
29862983
AugmentedInterfaceElement (class extends Object implements AugmentedInstanceElement, deprecated):
29872984
new (constructor: AugmentedInterfaceElement Function())
29882985
firstFragment (getter: InterfaceElement)
@@ -3245,14 +3242,6 @@ package:analyzer/dart/element/element.dart:
32453242
getMethod (method: MethodElement? Function(String))
32463243
getSetter (method: PropertyAccessorElement? Function(String))
32473244
instantiate (method: InterfaceType Function({required NullabilitySuffix nullabilitySuffix, required List<DartType> typeArguments}))
3248-
lookUpConcreteMethod (method: MethodElement? Function(String, LibraryElement))
3249-
lookUpGetter (method: PropertyAccessorElement? Function(String, LibraryElement), deprecated)
3250-
lookUpInheritedConcreteGetter (method: PropertyAccessorElement? Function(String, LibraryElement))
3251-
lookUpInheritedConcreteMethod (method: MethodElement? Function(String, LibraryElement))
3252-
lookUpInheritedConcreteSetter (method: PropertyAccessorElement? Function(String, LibraryElement))
3253-
lookUpInheritedMethod (method: MethodElement? Function(String, LibraryElement))
3254-
lookUpMethod (method: MethodElement? Function(String, LibraryElement), deprecated)
3255-
lookUpSetter (method: PropertyAccessorElement? Function(String, LibraryElement), deprecated)
32563245
JoinPatternVariableElement (class extends Object implements PatternVariableElement, deprecated):
32573246
new (constructor: JoinPatternVariableElement Function())
32583247
isConsistent (getter: bool)

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 0 additions & 191 deletions
Original file line numberDiff line numberDiff line change
@@ -106,39 +106,6 @@ abstract class AugmentedInstanceElement {
106106

107107
/// Returns the setter from [accessors] that has the given [name].
108108
PropertyAccessorElement? getSetter(String name);
109-
110-
/// Returns the element representing the getter that results from looking up
111-
/// the given [name] in this class with respect to the given [library],
112-
/// or `null` if the look up fails.
113-
///
114-
/// The behavior of this method is defined by the Dart Language Specification
115-
/// in section 17.18 Lookup.
116-
PropertyAccessorElement? lookUpGetter({
117-
required String name,
118-
required LibraryElement library,
119-
});
120-
121-
/// Returns the element representing the method that results from looking up
122-
/// the given [name] in this class with respect to the given [library],
123-
/// or `null` if the look up fails.
124-
///
125-
/// The behavior of this method is defined by the Dart Language Specification
126-
/// in section 17.18 Lookup.
127-
MethodElement? lookUpMethod({
128-
required String name,
129-
required LibraryElement library,
130-
});
131-
132-
/// Returns the element representing the setter that results from looking up
133-
/// the given [name] in this class with respect to the given [library],
134-
/// or `null` if the look up fails.
135-
///
136-
/// The behavior of this method is defined by the Dart Language Specification
137-
/// in section 17.18 Lookup.
138-
PropertyAccessorElement? lookUpSetter({
139-
required String name,
140-
required LibraryElement library,
141-
});
142109
}
143110

144111
/// The result of applying augmentations to a [InterfaceElement].
@@ -1242,164 +1209,6 @@ abstract class InterfaceElement implements InstanceElement {
12421209
required List<DartType> typeArguments,
12431210
required NullabilitySuffix nullabilitySuffix,
12441211
});
1245-
1246-
/// Returns the element representing the method that results from looking up
1247-
/// the given [methodName] in this class with respect to the given [library],
1248-
/// ignoring abstract methods, or `null` if the look up fails.
1249-
///
1250-
/// The behavior of this method is defined by the Dart Language Specification
1251-
/// in section 16.15.1:
1252-
/// <blockquote>
1253-
/// The result of looking up method <i>m</i> in class <i>C</i> with respect to
1254-
/// library <i>L</i> is: If <i>C</i> declares an instance method named
1255-
/// <i>m</i> that is accessible to <i>L</i>, then that method is the result of
1256-
/// the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the
1257-
/// result of the lookup is the result of looking up method <i>m</i> in
1258-
/// <i>S</i> with respect to <i>L</i>. Otherwise, we say that the lookup has
1259-
/// failed.
1260-
/// </blockquote>
1261-
// TODO(scheglov): Deprecate and remove it.
1262-
MethodElement? lookUpConcreteMethod(
1263-
String methodName, LibraryElement library);
1264-
1265-
/// Returns the element representing the getter that results from looking up
1266-
/// the given [getterName] in this class with respect to the given [library],
1267-
/// or `null` if the look up fails.
1268-
///
1269-
/// The behavior of this method is defined by the Dart Language Specification
1270-
/// in section 16.15.2:
1271-
/// <blockquote>
1272-
/// The result of looking up getter (respectively setter) <i>m</i> in class
1273-
/// <i>C</i> with respect to library <i>L</i> is: If <i>C</i> declares an
1274-
/// instance getter (respectively setter) named <i>m</i> that is accessible to
1275-
/// <i>L</i>, then that getter (respectively setter) is the result of the
1276-
/// lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result
1277-
/// of the lookup is the result of looking up getter (respectively setter)
1278-
/// <i>m</i> in <i>S</i> with respect to <i>L</i>. Otherwise, we say that the
1279-
/// lookup has failed.
1280-
/// </blockquote>
1281-
@Deprecated('Use `element.augmented.lookUpGetter`.')
1282-
PropertyAccessorElement? lookUpGetter(
1283-
String getterName, LibraryElement library);
1284-
1285-
/// Returns the element representing the getter that results from looking up
1286-
/// the given [getterName] in the superclass of this class with respect to the
1287-
/// given [library], ignoring abstract getters, or `null` if the look up
1288-
/// fails.
1289-
///
1290-
/// The behavior of this method is defined by the Dart Language Specification
1291-
/// in section 16.15.2:
1292-
/// <blockquote>
1293-
/// The result of looking up getter (respectively setter) <i>m</i> in class
1294-
/// <i>C</i> with respect to library <i>L</i> is: If <i>C</i> declares an
1295-
/// instance getter (respectively setter) named <i>m</i> that is accessible to
1296-
/// <i>L</i>, then that getter (respectively setter) is the result of the
1297-
/// lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result
1298-
/// of the lookup is the result of looking up getter (respectively setter)
1299-
/// <i>m</i> in <i>S</i> with respect to <i>L</i>. Otherwise, we say that the
1300-
/// lookup has failed.
1301-
/// </blockquote>
1302-
// TODO(scheglov): Deprecate and remove it.
1303-
PropertyAccessorElement? lookUpInheritedConcreteGetter(
1304-
String getterName, LibraryElement library);
1305-
1306-
/// Returns the element representing the method that results from looking up
1307-
/// the given [methodName] in the superclass of this class with respect to the
1308-
/// given [library], ignoring abstract methods, or `null` if the look up
1309-
/// fails.
1310-
///
1311-
/// The behavior of this method is defined by the Dart Language Specification
1312-
/// in section 16.15.1:
1313-
/// <blockquote>
1314-
/// The result of looking up method <i>m</i> in class <i>C</i> with respect to
1315-
/// library <i>L</i> is: If <i>C</i> declares an instance method named
1316-
/// <i>m</i> that is accessible to <i>L</i>, then that method is the result of
1317-
/// the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the
1318-
/// result of the lookup is the result of looking up method <i>m</i> in
1319-
/// <i>S</i> with respect to <i>L</i>. Otherwise, we say that the lookup has
1320-
/// failed.
1321-
/// </blockquote>
1322-
// TODO(scheglov): Deprecate and remove it.
1323-
MethodElement? lookUpInheritedConcreteMethod(
1324-
String methodName, LibraryElement library);
1325-
1326-
/// Returns the element representing the setter that results from looking up
1327-
/// the given [setterName] in the superclass of this class with respect to the
1328-
/// given [library], ignoring abstract setters, or `null` if the look up
1329-
/// fails.
1330-
///
1331-
/// The behavior of this method is defined by the Dart Language Specification
1332-
/// in section 16.15.2:
1333-
/// <blockquote>
1334-
/// The result of looking up getter (respectively setter) <i>m</i> in class
1335-
/// <i>C</i> with respect to library <i>L</i> is: If <i>C</i> declares an
1336-
/// instance getter (respectively setter) named <i>m</i> that is accessible to
1337-
/// <i>L</i>, then that getter (respectively setter) is the result of the
1338-
/// lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result
1339-
/// of the lookup is the result of looking up getter (respectively setter)
1340-
/// <i>m</i> in <i>S</i> with respect to <i>L</i>. Otherwise, we say that the
1341-
/// lookup has failed.
1342-
/// </blockquote>
1343-
// TODO(scheglov): Deprecate and remove it.
1344-
PropertyAccessorElement? lookUpInheritedConcreteSetter(
1345-
String setterName, LibraryElement library);
1346-
1347-
/// Returns the element representing the method that results from looking up
1348-
/// the given [methodName] in the superclass of this class with respect to the
1349-
/// given [library], or `null` if the look up fails.
1350-
///
1351-
/// The behavior of this method is defined by the Dart Language Specification
1352-
/// in section 16.15.1:
1353-
/// <blockquote>
1354-
/// The result of looking up method <i>m</i> in class <i>C</i> with respect to
1355-
/// library <i>L</i> is: If <i>C</i> declares an instance method named
1356-
/// <i>m</i> that is accessible to <i>L</i>, then that method is the result of
1357-
/// the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the
1358-
/// result of the lookup is the result of looking up method <i>m</i> in
1359-
/// <i>S</i> with respect to <i>L</i>. Otherwise, we say that the lookup has
1360-
/// failed.
1361-
/// </blockquote>
1362-
// TODO(scheglov): Deprecate and remove it.
1363-
MethodElement? lookUpInheritedMethod(
1364-
String methodName, LibraryElement library);
1365-
1366-
/// Returns the element representing the method that results from looking up
1367-
/// the given [methodName] in this class with respect to the given [library],
1368-
/// or `null` if the look up fails.
1369-
///
1370-
/// The behavior of this method is defined by the Dart Language Specification
1371-
/// in section 16.15.1:
1372-
/// <blockquote>
1373-
/// The result of looking up method <i>m</i> in class <i>C</i> with respect to
1374-
/// library <i>L</i> is: If <i>C</i> declares an instance method named
1375-
/// <i>m</i> that is accessible to <i>L</i>, then that method is the result of
1376-
/// the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the
1377-
/// result of the lookup is the result of looking up method <i>m</i> in
1378-
/// <i>S</i> with respect to <i>L</i>. Otherwise, we say that the lookup has
1379-
/// failed.
1380-
/// </blockquote>
1381-
@Deprecated('Use `element.augmented.lookUpMethod`.')
1382-
MethodElement? lookUpMethod(String methodName, LibraryElement library);
1383-
1384-
/// Returns the element representing the setter that results from looking up
1385-
/// the given [setterName] in this class with respect to the given [library],
1386-
/// or `null` if the look up fails.
1387-
///
1388-
/// The behavior of this method is defined by the Dart Language Specification
1389-
/// in section 16.15.2:
1390-
/// <blockquote>
1391-
/// The result of looking up getter (respectively setter) <i>m</i> in class
1392-
/// <i>C</i> with respect to library <i>L</i> is: If <i>C</i> declares an
1393-
/// instance getter (respectively setter) named <i>m</i> that is accessible to
1394-
/// <i>L</i>, then that getter (respectively setter) is the result of the
1395-
/// lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result
1396-
/// of the lookup is the result of looking up getter (respectively setter)
1397-
/// <i>m</i> in <i>S</i> with respect to <i>L</i>. Otherwise, we say that the
1398-
/// lookup has failed.
1399-
/// </blockquote>
1400-
@Deprecated('Use `element.augmented.lookUpSetter`.')
1401-
PropertyAccessorElement? lookUpSetter(
1402-
String setterName, LibraryElement library);
14031212
}
14041213

14051214
/// A pattern variable that is a join of other pattern variables, created

0 commit comments

Comments
 (0)