Skip to content

Commit c5305e2

Browse files
committed
Elements. Remove V1 from TypeProvider.
Change-Id: I749c7b070e4aa090b22ec1cb6aeb636951f2d4ca Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423140 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 6faefb6 commit c5305e2

File tree

3 files changed

+0
-203
lines changed

3 files changed

+0
-203
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4448,69 +4448,51 @@ package:analyzer/dart/element/type.dart:
44484448
package:analyzer/dart/element/type_provider.dart:
44494449
TypeProvider (class extends Object):
44504450
new (constructor: TypeProvider Function())
4451-
boolElement (getter: ClassElement, deprecated)
44524451
boolElement2 (getter: ClassElement2, experimental)
44534452
boolType (getter: InterfaceType)
44544453
bottomType (getter: DartType)
44554454
deprecatedType (getter: InterfaceType)
4456-
doubleElement (getter: ClassElement, deprecated)
44574455
doubleElement2 (getter: ClassElement2, experimental)
44584456
doubleType (getter: InterfaceType)
44594457
dynamicType (getter: DartType)
4460-
enumElement (getter: ClassElement?, deprecated)
44614458
enumElement2 (getter: ClassElement2?, experimental)
44624459
enumType (getter: InterfaceType?)
44634460
functionType (getter: InterfaceType)
44644461
futureDynamicType (getter: InterfaceType)
4465-
futureElement (getter: ClassElement, deprecated)
44664462
futureElement2 (getter: ClassElement2, experimental)
44674463
futureNullType (getter: InterfaceType)
4468-
futureOrElement (getter: ClassElement, deprecated)
44694464
futureOrElement2 (getter: ClassElement2, experimental)
44704465
futureOrNullType (getter: InterfaceType)
4471-
intElement (getter: ClassElement, deprecated)
44724466
intElement2 (getter: ClassElement2, experimental)
44734467
intType (getter: InterfaceType)
44744468
iterableDynamicType (getter: InterfaceType)
4475-
iterableElement (getter: ClassElement, deprecated)
44764469
iterableElement2 (getter: ClassElement2, experimental)
44774470
iterableObjectType (getter: InterfaceType)
4478-
listElement (getter: ClassElement, deprecated)
44794471
listElement2 (getter: ClassElement2, experimental)
4480-
mapElement (getter: ClassElement, deprecated)
44814472
mapElement2 (getter: ClassElement2, experimental)
44824473
mapObjectObjectType (getter: InterfaceType)
44834474
neverType (getter: NeverType)
4484-
nullElement (getter: ClassElement, deprecated)
44854475
nullElement2 (getter: ClassElement2, experimental)
44864476
nullType (getter: InterfaceType)
4487-
numElement (getter: ClassElement, deprecated)
44884477
numElement2 (getter: ClassElement2, experimental)
44894478
numType (getter: InterfaceType)
4490-
objectElement (getter: ClassElement, deprecated)
44914479
objectElement2 (getter: ClassElement2, experimental)
44924480
objectQuestionType (getter: InterfaceType)
44934481
objectType (getter: InterfaceType)
4494-
recordElement (getter: ClassElement, deprecated)
44954482
recordElement2 (getter: ClassElement2, experimental)
44964483
recordType (getter: InterfaceType)
4497-
setElement (getter: ClassElement, deprecated)
44984484
setElement2 (getter: ClassElement2, experimental)
44994485
stackTraceType (getter: InterfaceType)
45004486
streamDynamicType (getter: InterfaceType)
4501-
streamElement (getter: ClassElement, deprecated)
45024487
streamElement2 (getter: ClassElement2, experimental)
4503-
stringElement (getter: ClassElement, deprecated)
45044488
stringElement2 (getter: ClassElement2, experimental)
45054489
stringType (getter: InterfaceType)
4506-
symbolElement (getter: ClassElement, deprecated)
45074490
symbolElement2 (getter: ClassElement2, experimental)
45084491
symbolType (getter: InterfaceType)
45094492
typeType (getter: InterfaceType)
45104493
voidType (getter: VoidType)
45114494
futureOrType (method: InterfaceType Function(DartType))
45124495
futureType (method: InterfaceType Function(DartType))
4513-
isNonSubtypableClass (method: bool Function(InterfaceElement), deprecated)
45144496
isNonSubtypableClass2 (method: bool Function(InterfaceElement2))
45154497
isObjectGetter (method: bool Function(String))
45164498
isObjectMember (method: bool Function(String))

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

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
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';
65
import 'package:analyzer/dart/element/element2.dart';
76
import 'package:analyzer/dart/element/type.dart';
87
import '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.
1413
abstract 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

Comments
 (0)