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- import 'package:analyzer/dart/element/element.dart' ;
65import 'package:analyzer/dart/element/element2.dart' ;
76import 'package:analyzer/dart/element/type.dart' ;
87import 'package:meta/meta.dart' ;
@@ -12,10 +11,6 @@ import 'package:meta/meta.dart';
1211///
1312/// Clients may not extend, implement or mix-in this class.
1413abstract class TypeProvider {
15- /// Return the element representing the built-in class `bool` .
16- @Deprecated ('Use boolElement2 instead' )
17- ClassElement get boolElement;
18-
1914 /// Return the element representing the built-in class `bool` .
2015 @experimental
2116 ClassElement2 get boolElement2;
@@ -29,10 +24,6 @@ abstract class TypeProvider {
2924 /// Return the type representing the built-in type `Deprecated` .
3025 InterfaceType get deprecatedType;
3126
32- /// Return the element representing the built-in class `double` .
33- @Deprecated ('Use doubleElement2 instead' )
34- ClassElement get doubleElement;
35-
3627 /// Return the element representing the built-in class `double` .
3728 @experimental
3829 ClassElement2 get doubleElement2;
@@ -43,11 +34,6 @@ abstract class TypeProvider {
4334 /// Return the type representing the built-in type `dynamic` .
4435 DartType get dynamicType;
4536
46- /// Return the element representing the built-in type `Enum` , or `null` if
47- /// the SDK does not have definition of `Enum` .
48- @Deprecated ('Use enumElement2 instead' )
49- ClassElement ? get enumElement;
50-
5137 /// Return the element representing the built-in type `Enum` , or `null` if
5238 /// the SDK does not have definition of `Enum` .
5339 @experimental
@@ -63,32 +49,20 @@ abstract class TypeProvider {
6349 /// Return the type representing `Future<dynamic>` .
6450 InterfaceType get futureDynamicType;
6551
66- /// Return the element representing the built-in class `Future` .
67- @Deprecated ('Use futureElement2 instead' )
68- ClassElement get futureElement;
69-
7052 /// Return the element representing the built-in class `Future` .
7153 @experimental
7254 ClassElement2 get futureElement2;
7355
7456 /// Return the type representing `Future<Null>` .
7557 InterfaceType get futureNullType;
7658
77- /// Return the element representing the built-in class `FutureOr` .
78- @Deprecated ('Use futureOrElement2 instead' )
79- ClassElement get futureOrElement;
80-
8159 /// Return the element representing the built-in class `FutureOr` .
8260 @experimental
8361 ClassElement2 get futureOrElement2;
8462
8563 /// Return the type representing `FutureOr<Null>` .
8664 InterfaceType get futureOrNullType;
8765
88- /// Return the element representing the built-in class `int` .
89- @Deprecated ('Use intElement2 instead' )
90- ClassElement get intElement;
91-
9266 /// Return the element representing the built-in class `int` .
9367 @experimental
9468 ClassElement2 get intElement2;
@@ -99,29 +73,17 @@ abstract class TypeProvider {
9973 /// Return the type representing the type `Iterable<dynamic>` .
10074 InterfaceType get iterableDynamicType;
10175
102- /// Return the element representing the built-in class `Iterable` .
103- @Deprecated ('Use iterableElement2 instead' )
104- ClassElement get iterableElement;
105-
10676 /// Return the element representing the built-in class `Iterable` .
10777 @experimental
10878 ClassElement2 get iterableElement2;
10979
11080 /// Return the type representing the type `Iterable<Object>` .
11181 InterfaceType get iterableObjectType;
11282
113- /// Return the element representing the built-in class `List` .
114- @Deprecated ('Use listElement2 instead' )
115- ClassElement get listElement;
116-
11783 /// Return the element representing the built-in class `List` .
11884 @experimental
11985 ClassElement2 get listElement2;
12086
121- /// Return the element representing the built-in class `Map` .
122- @Deprecated ('Use mapElement2 instead' )
123- ClassElement get mapElement;
124-
12587 /// Return the element representing the built-in class `Map` .
12688 @experimental
12789 ClassElement2 get mapElement2;
@@ -132,32 +94,20 @@ abstract class TypeProvider {
13294 /// Return the type representing the built-in type `Never` .
13395 NeverType get neverType;
13496
135- /// Return the element representing the built-in class `Null` .
136- @Deprecated ('Use nullElement2 instead' )
137- ClassElement get nullElement;
138-
13997 /// Return the element representing the built-in class `Null` .
14098 @experimental
14199 ClassElement2 get nullElement2;
142100
143101 /// Return the type representing the built-in type `Null` .
144102 InterfaceType get nullType;
145103
146- /// Return the element representing the built-in class `num` .
147- @Deprecated ('Use numElement2 instead' )
148- ClassElement get numElement;
149-
150104 /// Return the element representing the built-in class `num` .
151105 @experimental
152106 ClassElement2 get numElement2;
153107
154108 /// Return the type representing the built-in type `num` .
155109 InterfaceType get numType;
156110
157- /// Return the element representing the built-in class `Object` .
158- @Deprecated ('Use objectElement2 instead' )
159- ClassElement get objectElement;
160-
161111 /// Return the element representing the built-in class `Object` .
162112 @experimental
163113 ClassElement2 get objectElement2;
@@ -168,21 +118,13 @@ abstract class TypeProvider {
168118 /// Return the type representing the built-in type `Object` .
169119 InterfaceType get objectType;
170120
171- /// Return the element representing the built-in class `Record` .
172- @Deprecated ('Use recordElement2 instead' )
173- ClassElement get recordElement;
174-
175121 /// Return the element representing the built-in class `Record` .
176122 @experimental
177123 ClassElement2 get recordElement2;
178124
179125 /// Return the type representing the built-in type `Record` .
180126 InterfaceType get recordType;
181127
182- /// Return the element representing the built-in class `Set` .
183- @Deprecated ('Use setElement2 instead' )
184- ClassElement get setElement;
185-
186128 /// Return the element representing the built-in class `Set` .
187129 @experimental
188130 ClassElement2 get setElement2;
@@ -193,29 +135,17 @@ abstract class TypeProvider {
193135 /// Return the type representing `Stream<dynamic>` .
194136 InterfaceType get streamDynamicType;
195137
196- /// Return the element representing the built-in class `Stream` .
197- @Deprecated ('Use streamElement2 instead' )
198- ClassElement get streamElement;
199-
200138 /// Return the element representing the built-in class `Stream` .
201139 @experimental
202140 ClassElement2 get streamElement2;
203141
204- /// Return the element representing the built-in class `String` .
205- @Deprecated ('Use stringElement2 instead' )
206- ClassElement get stringElement;
207-
208142 /// Return the element representing the built-in class `String` .
209143 @experimental
210144 ClassElement2 get stringElement2;
211145
212146 /// Return the type representing the built-in type `String` .
213147 InterfaceType get stringType;
214148
215- /// Return the element representing the built-in class `Symbol` .
216- @Deprecated ('Use symbolElement2 instead' )
217- ClassElement get symbolElement;
218-
219149 /// Return the element representing the built-in class `Symbol` .
220150 @experimental
221151 ClassElement2 get symbolElement2;
@@ -237,10 +167,6 @@ abstract class TypeProvider {
237167 /// given [valueType] . The type has the nullability suffix of this provider.
238168 InterfaceType futureType (DartType valueType);
239169
240- /// Return `true` if [element] cannot be extended, implemented, or mixed in.
241- @Deprecated ('Use isNonSubtypableClass2() instead' )
242- bool isNonSubtypableClass (InterfaceElement element);
243-
244170 /// Return `true` if [element] cannot be extended, implemented, or mixed in.
245171 bool isNonSubtypableClass2 (InterfaceElement2 element);
246172
0 commit comments