22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- // ignore_for_file: analyzer_use_new_elements
6-
75import 'package:analyzer/dart/element/element.dart' ;
86import 'package:analyzer/dart/element/element2.dart' ;
97import 'package:analyzer/dart/element/type.dart' ;
@@ -15,6 +13,7 @@ import 'package:meta/meta.dart';
1513/// Clients may not extend, implement or mix-in this class.
1614abstract class TypeProvider {
1715 /// Return the element representing the built-in class `bool` .
16+ @Deprecated ('Use boolElement2 instead' )
1817 ClassElement get boolElement;
1918
2019 /// Return the element representing the built-in class `bool` .
@@ -31,6 +30,7 @@ abstract class TypeProvider {
3130 InterfaceType get deprecatedType;
3231
3332 /// Return the element representing the built-in class `double` .
33+ @Deprecated ('Use doubleElement2 instead' )
3434 ClassElement get doubleElement;
3535
3636 /// Return the element representing the built-in class `double` .
@@ -45,6 +45,7 @@ abstract class TypeProvider {
4545
4646 /// Return the element representing the built-in type `Enum` , or `null` if
4747 /// the SDK does not have definition of `Enum` .
48+ @Deprecated ('Use enumElement2 instead' )
4849 ClassElement ? get enumElement;
4950
5051 /// Return the element representing the built-in type `Enum` , or `null` if
@@ -63,6 +64,7 @@ abstract class TypeProvider {
6364 InterfaceType get futureDynamicType;
6465
6566 /// Return the element representing the built-in class `Future` .
67+ @Deprecated ('Use futureElement2 instead' )
6668 ClassElement get futureElement;
6769
6870 /// Return the element representing the built-in class `Future` .
@@ -73,6 +75,7 @@ abstract class TypeProvider {
7375 InterfaceType get futureNullType;
7476
7577 /// Return the element representing the built-in class `FutureOr` .
78+ @Deprecated ('Use futureOrElement2 instead' )
7679 ClassElement get futureOrElement;
7780
7881 /// Return the element representing the built-in class `FutureOr` .
@@ -83,6 +86,7 @@ abstract class TypeProvider {
8386 InterfaceType get futureOrNullType;
8487
8588 /// Return the element representing the built-in class `int` .
89+ @Deprecated ('Use intElement2 instead' )
8690 ClassElement get intElement;
8791
8892 /// Return the element representing the built-in class `int` .
@@ -96,6 +100,7 @@ abstract class TypeProvider {
96100 InterfaceType get iterableDynamicType;
97101
98102 /// Return the element representing the built-in class `Iterable` .
103+ @Deprecated ('Use iterableElement2 instead' )
99104 ClassElement get iterableElement;
100105
101106 /// Return the element representing the built-in class `Iterable` .
@@ -106,13 +111,15 @@ abstract class TypeProvider {
106111 InterfaceType get iterableObjectType;
107112
108113 /// Return the element representing the built-in class `List` .
114+ @Deprecated ('Use listElement2 instead' )
109115 ClassElement get listElement;
110116
111117 /// Return the element representing the built-in class `List` .
112118 @experimental
113119 ClassElement2 get listElement2;
114120
115121 /// Return the element representing the built-in class `Map` .
122+ @Deprecated ('Use mapElement2 instead' )
116123 ClassElement get mapElement;
117124
118125 /// Return the element representing the built-in class `Map` .
@@ -126,6 +133,7 @@ abstract class TypeProvider {
126133 NeverType get neverType;
127134
128135 /// Return the element representing the built-in class `Null` .
136+ @Deprecated ('Use nullElement2 instead' )
129137 ClassElement get nullElement;
130138
131139 /// Return the element representing the built-in class `Null` .
@@ -136,6 +144,7 @@ abstract class TypeProvider {
136144 InterfaceType get nullType;
137145
138146 /// Return the element representing the built-in class `num` .
147+ @Deprecated ('Use numElement2 instead' )
139148 ClassElement get numElement;
140149
141150 /// Return the element representing the built-in class `num` .
@@ -146,6 +155,7 @@ abstract class TypeProvider {
146155 InterfaceType get numType;
147156
148157 /// Return the element representing the built-in class `Object` .
158+ @Deprecated ('Use objectElement2 instead' )
149159 ClassElement get objectElement;
150160
151161 /// Return the element representing the built-in class `Object` .
@@ -159,6 +169,7 @@ abstract class TypeProvider {
159169 InterfaceType get objectType;
160170
161171 /// Return the element representing the built-in class `Record` .
172+ @Deprecated ('Use recordElement2 instead' )
162173 ClassElement get recordElement;
163174
164175 /// Return the element representing the built-in class `Record` .
@@ -169,6 +180,7 @@ abstract class TypeProvider {
169180 InterfaceType get recordType;
170181
171182 /// Return the element representing the built-in class `Set` .
183+ @Deprecated ('Use setElement2 instead' )
172184 ClassElement get setElement;
173185
174186 /// Return the element representing the built-in class `Set` .
@@ -182,13 +194,15 @@ abstract class TypeProvider {
182194 InterfaceType get streamDynamicType;
183195
184196 /// Return the element representing the built-in class `Stream` .
197+ @Deprecated ('Use streamElement2 instead' )
185198 ClassElement get streamElement;
186199
187200 /// Return the element representing the built-in class `Stream` .
188201 @experimental
189202 ClassElement2 get streamElement2;
190203
191204 /// Return the element representing the built-in class `String` .
205+ @Deprecated ('Use stringElement2 instead' )
192206 ClassElement get stringElement;
193207
194208 /// Return the element representing the built-in class `String` .
@@ -199,6 +213,7 @@ abstract class TypeProvider {
199213 InterfaceType get stringType;
200214
201215 /// Return the element representing the built-in class `Symbol` .
216+ @Deprecated ('Use symbolElement2 instead' )
202217 ClassElement get symbolElement;
203218
204219 /// Return the element representing the built-in class `Symbol` .
@@ -223,6 +238,7 @@ abstract class TypeProvider {
223238 InterfaceType futureType (DartType valueType);
224239
225240 /// Return `true` if [element] cannot be extended, implemented, or mixed in.
241+ @Deprecated ('Use isNonSubtypableClass2() instead' )
226242 bool isNonSubtypableClass (InterfaceElement element);
227243
228244 /// Return `true` if [element] cannot be extended, implemented, or mixed in.
0 commit comments