Skip to content

Commit 5b12339

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove V1 AugmentedXyz classes.
Change-Id: I68927787aa365ab9d182c2938271a1885858a546 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423361 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 4f7eca8 commit 5b12339

File tree

3 files changed

+0
-196
lines changed

3 files changed

+0
-196
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,27 +2968,6 @@ package:analyzer/dart/constant/value.dart:
29682968
toSymbolValue (method: String? Function())
29692969
toTypeValue (method: DartType? Function())
29702970
package:analyzer/dart/element/element.dart:
2971-
AugmentedInstanceElement (class extends Object, deprecated):
2972-
new (constructor: AugmentedInstanceElement Function())
2973-
accessors (getter: List<PropertyAccessorElement>)
2974-
fields (getter: List<FieldElement>)
2975-
firstFragment (getter: InstanceElement)
2976-
metadata (getter: List<ElementAnnotation>)
2977-
methods (getter: List<MethodElement>)
2978-
thisType (getter: DartType)
2979-
getField (method: FieldElement? Function(String))
2980-
getGetter (method: PropertyAccessorElement? Function(String))
2981-
getMethod (method: MethodElement? Function(String))
2982-
getSetter (method: PropertyAccessorElement? Function(String))
2983-
AugmentedInterfaceElement (class extends Object implements AugmentedInstanceElement, deprecated):
2984-
new (constructor: AugmentedInterfaceElement Function())
2985-
firstFragment (getter: InterfaceElement)
2986-
interfaces (getter: List<InterfaceType>)
2987-
mixins (getter: List<InterfaceType>)
2988-
thisType (getter: InterfaceType)
2989-
AugmentedMixinElement (class extends AugmentedInterfaceElement, deprecated):
2990-
new (constructor: AugmentedMixinElement Function())
2991-
superclassConstraints (getter: List<InterfaceType>)
29922971
BindPatternVariableElement (class extends Object implements PatternVariableElement, deprecated):
29932972
new (constructor: BindPatternVariableElement Function())
29942973
ClassMemberElement (class extends Object implements Element, deprecated):
@@ -3222,7 +3201,6 @@ package:analyzer/dart/element/element.dart:
32223201
InstanceElement (class extends Object implements TypeDefiningElement, TypeParameterizedElement, deprecated):
32233202
new (constructor: InstanceElement Function())
32243203
accessors (getter: List<PropertyAccessorElement>)
3225-
augmented (getter: AugmentedInstanceElement, deprecated)
32263204
enclosingElement3 (getter: CompilationUnitElement, deprecated)
32273205
fields (getter: List<FieldElement>)
32283206
isAugmentation (getter: bool)
@@ -3231,7 +3209,6 @@ package:analyzer/dart/element/element.dart:
32313209
InterfaceElement (class extends Object implements InstanceElement, deprecated):
32323210
new (constructor: InterfaceElement Function())
32333211
allSupertypes (getter: List<InterfaceType>)
3234-
augmented (getter: AugmentedInterfaceElement, deprecated)
32353212
interfaces (getter: List<InterfaceType>)
32363213
mixins (getter: List<InterfaceType>, deprecated)
32373214
name (getter: String)

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

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -60,90 +60,6 @@ import 'package:analyzer/src/task/api/model.dart' show AnalysisTarget;
6060
import 'package:meta/meta.dart';
6161
import 'package:pub_semver/pub_semver.dart';
6262

63-
/// The result of applying augmentations to a [InstanceElement].
64-
///
65-
/// Clients may not extend, implement or mix-in this class.
66-
@Deprecated(elementModelDeprecationMsg)
67-
abstract class AugmentedInstanceElement {
68-
/// The accessors (getters and setters) declared in this element.
69-
///
70-
/// [PropertyAccessorElement]s replace corresponding elements,
71-
/// other [PropertyAccessorElement]s are appended.
72-
List<PropertyAccessorElement> get accessors;
73-
74-
/// The fields declared in this element.
75-
///
76-
/// `FieldAugmentationElement`s replace corresponding elements, other
77-
/// [FieldElement]s are appended.
78-
List<FieldElement> get fields;
79-
80-
/// The declaration (not augmentation) that owns this result.
81-
InstanceElement get firstFragment;
82-
83-
/// The metadata associated with this element.
84-
///
85-
/// This is a union of annotations associated with the class declaration and
86-
/// all its augmentations.
87-
List<ElementAnnotation> get metadata;
88-
89-
/// The methods declared in this element.
90-
///
91-
/// `MethodAugmentationElement`s replace corresponding elements, other
92-
/// [MethodElement]s are appended.
93-
List<MethodElement> get methods;
94-
95-
/// The type of `this` expression.
96-
DartType get thisType;
97-
98-
/// Returns the field from [fields] that has the given [name].
99-
FieldElement? getField(String name);
100-
101-
/// Returns the getter from [accessors] that has the given [name].
102-
PropertyAccessorElement? getGetter(String name);
103-
104-
/// Returns the method from [methods] that has the given [name].
105-
MethodElement? getMethod(String name);
106-
107-
/// Returns the setter from [accessors] that has the given [name].
108-
PropertyAccessorElement? getSetter(String name);
109-
}
110-
111-
/// The result of applying augmentations to a [InterfaceElement].
112-
///
113-
/// Clients may not extend, implement or mix-in this class.
114-
@Deprecated(elementModelDeprecationMsg)
115-
abstract class AugmentedInterfaceElement implements AugmentedInstanceElement {
116-
@override
117-
InterfaceElement get firstFragment;
118-
119-
/// The interfaces implemented by this element.
120-
///
121-
/// This is a union of interfaces declared by the class declaration and
122-
/// all its augmentations.
123-
List<InterfaceType> get interfaces;
124-
125-
/// The mixins applied by this class or in its augmentations.
126-
///
127-
/// This is a union of mixins applied by the class declaration and all its
128-
/// augmentations.
129-
List<InterfaceType> get mixins;
130-
131-
@override
132-
InterfaceType get thisType;
133-
}
134-
135-
/// The result of applying augmentations to a [MixinElement].
136-
///
137-
/// Clients may not extend, implement or mix-in this class.
138-
@Deprecated(elementModelDeprecationMsg)
139-
abstract class AugmentedMixinElement extends AugmentedInterfaceElement {
140-
/// The superclass constraints of this element.
141-
///
142-
/// This is a union of constraints declared by the class declaration and
143-
/// all its augmentations.
144-
List<InterfaceType> get superclassConstraints;
145-
}
146-
14763
/// A pattern variable that is explicitly declared.
14864
///
14965
/// Clients may not extend, implement or mix-in this class.
@@ -1093,13 +1009,6 @@ abstract class InstanceElement
10931009
/// The declared accessors (getters and setters).
10941010
List<PropertyAccessorElement> get accessors;
10951011

1096-
/// The result of merging augmentations.
1097-
///
1098-
/// It includes the members of the base element and its augmentations as
1099-
/// specified by the merge operations.
1100-
@Deprecated(elementModelDeprecationMsg)
1101-
AugmentedInstanceElement get augmented;
1102-
11031012
@Deprecated(elementModelDeprecationMsg)
11041013
@override
11051014
CompilationUnitElement get enclosingElement3;
@@ -1131,10 +1040,6 @@ abstract class InterfaceElement implements InstanceElement {
11311040
/// This includes superclasses, mixins, interfaces, and superclass constraints.
11321041
List<InterfaceType> get allSupertypes;
11331042

1134-
@Deprecated(elementModelDeprecationMsg)
1135-
@override
1136-
AugmentedInterfaceElement get augmented;
1137-
11381043
/// The interfaces that are implemented by this class.
11391044
///
11401045
/// <b>Note:</b> Because the element model represents the state of the code,

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

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -89,75 +89,6 @@ mixin AugmentableFragment on ElementImpl {
8989
}
9090
}
9191

92-
@Deprecated(elementModelDeprecationMsg)
93-
class AugmentedInstanceElementImpl implements AugmentedInstanceElement {
94-
@override
95-
final InstanceElementImpl firstFragment;
96-
97-
AugmentedInstanceElementImpl(this.firstFragment);
98-
99-
@override
100-
List<PropertyAccessorElement> get accessors => firstFragment.accessors;
101-
102-
@override
103-
List<FieldElement> get fields => firstFragment.fields;
104-
105-
@override
106-
List<ElementAnnotation> get metadata => firstFragment.metadata;
107-
108-
@override
109-
List<MethodElement> get methods => firstFragment.methods;
110-
111-
@override
112-
DartType get thisType => firstFragment.thisType;
113-
114-
@override
115-
FieldElement? getField(String name) {
116-
return fields.firstWhereOrNull((e) => e.name == name);
117-
}
118-
119-
@override
120-
PropertyAccessorElement? getGetter(String name) {
121-
return accessors
122-
.where((e) => e.isGetter)
123-
.firstWhereOrNull((e) => e.name == name);
124-
}
125-
126-
@override
127-
MethodElement? getMethod(String name) {
128-
return methods.firstWhereOrNull((e) => e.name == name);
129-
}
130-
131-
@override
132-
PropertyAccessorElement? getSetter(String name) {
133-
return accessors
134-
.where((e) => e.isSetter)
135-
.firstWhereOrNull((e) => e.name == name);
136-
}
137-
}
138-
139-
@Deprecated(elementModelDeprecationMsg)
140-
class AugmentedInterfaceElementImpl extends AugmentedInstanceElementImpl
141-
implements AugmentedInterfaceElement {
142-
AugmentedInterfaceElementImpl(super.firstFragment);
143-
144-
@override
145-
InterfaceElementImpl get firstFragment {
146-
return super.firstFragment as InterfaceElementImpl;
147-
}
148-
149-
@override
150-
List<InterfaceType> get interfaces => firstFragment.interfaces;
151-
152-
@override
153-
List<InterfaceType> get mixins => firstFragment.mixins;
154-
155-
@override
156-
InterfaceType get thisType {
157-
return super.thisType as InterfaceType;
158-
}
159-
}
160-
16192
class BindPatternVariableElementImpl extends PatternVariableElementImpl
16293
implements
16394
// ignore: deprecated_member_use_from_same_package,analyzer_use_new_elements
@@ -5560,10 +5491,6 @@ abstract class InstanceElementImpl extends _ExistingElementImpl
55605491
_accessors = accessors;
55615492
}
55625493

5563-
@Deprecated(elementModelDeprecationMsg)
5564-
@override
5565-
AugmentedInstanceElement get augmented => AugmentedInstanceElementImpl(this);
5566-
55675494
@override
55685495
InstanceElementImpl2 get element;
55695496

@@ -5948,11 +5875,6 @@ abstract class InterfaceElementImpl extends InstanceElementImpl
59485875
library.session.classHierarchy.implementedInterfaces(element);
59495876
}
59505877

5951-
@Deprecated(elementModelDeprecationMsg)
5952-
@override
5953-
AugmentedInterfaceElement get augmented =>
5954-
AugmentedInterfaceElementImpl(this);
5955-
59565878
@Deprecated('Use Element2 instead')
59575879
@override
59585880
List<Element> get children => [

0 commit comments

Comments
 (0)