@@ -27,9 +27,6 @@ class AnnotatedElement {
2727
2828 const AnnotatedElement (this .annotation, this .element);
2929
30- @Deprecated ('use element instead' )
31- Element2 get element2 => element;
32-
3330 Metadata ? get metadata2 {
3431 if (element case final Annotatable annotatable) {
3532 return annotatable.metadata2;
@@ -44,33 +41,15 @@ class LibraryReader {
4441
4542 LibraryReader (this .element);
4643
47- @Deprecated ('use the default constructor instead' )
48- LibraryReader .v2 (this .element);
49-
50- @Deprecated ('use element instead' )
51- LibraryElement2 get element2 => element;
52-
5344 /// All of the declarations in this library.
5445 Iterable <Element2 > get allElements => [element, ...element.children2];
5546
56- /// All of the declarations in this library.
57- @Deprecated ('use allElements instead' )
58- Iterable <Element2 > get allElements2 => allElements;
59-
6047 /// All of the elements representing classes in this library.
6148 Iterable <ClassElement2 > get classes => element.classes;
6249
63- /// All of the elements representing classes in this library.
64- @Deprecated ('use classes instead' )
65- Iterable <ClassElement2 > get classes2 => classes;
66-
6750 /// All of the elements representing enums in this library.
6851 Iterable <EnumElement2 > get enums => element.enums;
6952
70- /// All of the elements representing enums in this library.
71- @Deprecated ('use enums instead' )
72- Iterable <EnumElement2 > get enums3 => enums;
73-
7453 /// All of the declarations in this library annotated with [checker] .
7554 Iterable <AnnotatedElement > annotatedWith (
7655 TypeChecker checker, {
@@ -137,13 +116,6 @@ class LibraryReader {
137116 return type is ClassElement2 ? type : null ;
138117 }
139118
140- /// Returns a top-level [ClassElement2] publicly visible in by [name] .
141- ///
142- /// Unlike `LibraryElement2.getClass` , this also correctly traverses
143- /// identifiers that are accessible via one or more `export` directives.
144- @Deprecated ('Use findType() instead' )
145- ClassElement2 ? findType2 (String name) => findType (name);
146-
147119 /// Returns a [Uri] from the current library to the target [asset] .
148120 ///
149121 /// This is a typed convenience function for using [pathToUrl] , and the same
@@ -157,13 +129,6 @@ class LibraryReader {
157129 Uri pathToElement (Element2 element) =>
158130 pathToUrl (element.firstFragment.libraryFragment! .source.uri);
159131
160- /// Returns a [Uri] from the current library to the target [element] .
161- ///
162- /// This is a typed convenience function for using [pathToUrl] , and the same
163- /// API restrictions hold around supported schemes and relative paths.
164- @Deprecated ('use pathToElement instead' )
165- Uri pathToElement2 (Element2 element) => pathToElement (element);
166-
167132 /// Returns a [Uri] from the current library to the one provided.
168133 ///
169134 /// If possible, a `package:` or `dart:` URL scheme will be used to reference
0 commit comments