77/// The only entrypoint for constructing these classes is [ElementType.for_] .
88library ;
99
10- import 'package:analyzer/dart/element/element2 .dart' ;
10+ import 'package:analyzer/dart/element/element .dart' ;
1111import 'package:analyzer/dart/element/nullability_suffix.dart' ;
1212import 'package:analyzer/dart/element/type.dart' ;
1313import 'package:dartdoc/src/model/comment_referable.dart' ;
@@ -67,7 +67,7 @@ abstract class ElementType with CommentReferable, Nameable {
6767 String toString () => '$type ' ;
6868}
6969
70- /// An [ElementType] that isn't pinned to an [Element2 ] (or one that is, but
70+ /// An [ElementType] that isn't pinned to an [Element ] (or one that is, but
7171/// whose element is irrelevant).
7272class UndefinedElementType extends ElementType {
7373 UndefinedElementType ._(super .type, super .library, super .packageGraph)
@@ -102,9 +102,9 @@ class UndefinedElementType extends ElementType {
102102 // We can not simply throw here because not all SDK libraries resolve
103103 // all types.
104104 if (type is InvalidType ) return 'dynamic' ;
105- assert (const {'Never' }.contains (type.documentableElement2? .name3 ),
105+ assert (const {'Never' }.contains (type.documentableElement2? .name ),
106106 'Unrecognized type for UndefinedElementType: $type ' );
107- return type.documentableElement2! .name3 ! ;
107+ return type.documentableElement2! .name ! ;
108108 }
109109
110110 @override
@@ -129,7 +129,7 @@ class UndefinedElementType extends ElementType {
129129 Iterable <CommentReferable >? get referenceGrandparentOverrides => null ;
130130}
131131
132- /// A [FunctionType] that does not have an underpinning [Element2 ] .
132+ /// A [FunctionType] that does not have an underpinning [Element ] .
133133class FunctionTypeElementType extends UndefinedElementType
134134 with Rendered , Callable {
135135 FunctionTypeElementType ._(
@@ -205,10 +205,10 @@ class ParameterizedElementType extends DefinedElementType with Rendered {
205205
206206/// An [ElementType] whose underlying type was referred to by a type alias.
207207mixin Aliased implements ElementType {
208- Element2 get typeAliasElement2 => type.alias! .element2 ;
208+ Element get typeAliasElement2 => type.alias! .element ;
209209
210210 @override
211- String get name => typeAliasElement2.name3 ! ;
211+ String get name => typeAliasElement2.name ! ;
212212
213213 @override
214214 bool get isTypedef => true ;
@@ -253,7 +253,7 @@ class TypeParameterElementType extends DefinedElementType {
253253 String get nameWithGenericsPlain => '$name $nullabilitySuffix ' ;
254254}
255255
256- /// An [ElementType] associated with an [Element2 ] .
256+ /// An [ElementType] associated with an [Element ] .
257257abstract class DefinedElementType extends ElementType {
258258 final ModelElement modelElement;
259259
@@ -263,7 +263,7 @@ abstract class DefinedElementType extends ElementType {
263263
264264 factory DefinedElementType ._from (DartType type, ModelElement modelElement,
265265 Library library, PackageGraph packageGraph) {
266- if (type is ! TypeAliasElement2 && type.alias != null ) {
266+ if (type is ! TypeAliasElement && type.alias != null ) {
267267 // Here, `alias.element` signals that this is a type referring to an
268268 // alias. (`TypeAliasElement.alias.element` has different implications.
269269 // In that case it is an actual type alias of some kind (generic or
@@ -288,7 +288,7 @@ abstract class DefinedElementType extends ElementType {
288288 }
289289
290290 @override
291- String get name => type.documentableElement2! .name3 ! ;
291+ String get name => type.documentableElement2! .name ! ;
292292
293293 @override
294294 String get fullyQualifiedName => modelElement.fullyQualifiedName;
0 commit comments