@@ -64,7 +64,7 @@ abstract class TypeChecker {
6464 /// Otherwise returns `null` .
6565 ///
6666 /// Throws on unresolved annotations unless [throwOnUnresolved] is `false` .
67- @deprecated
67+ @Deprecated ( 'use firstAnnotationOf2 instead' )
6868 DartObject ? firstAnnotationOf (
6969 Element element, {
7070 bool throwOnUnresolved = true ,
@@ -104,7 +104,7 @@ abstract class TypeChecker {
104104 /// Returns if a constant annotating [element] is assignable to this type.
105105 ///
106106 /// Throws on unresolved annotations unless [throwOnUnresolved] is `false` .
107- @deprecated
107+ @Deprecated ( 'use hasAnnotationOf2 instead' )
108108 bool hasAnnotationOf (Element element, {bool throwOnUnresolved = true }) =>
109109 firstAnnotationOf (element, throwOnUnresolved: throwOnUnresolved) != null ;
110110
@@ -118,7 +118,7 @@ abstract class TypeChecker {
118118 ///
119119 /// Throws [UnresolvedAnnotationException] on unresolved annotations unless
120120 /// [throwOnUnresolved] is explicitly set to `false` (default is `true` ).
121- @deprecated
121+ @Deprecated ( 'use firstAnnotationOfExact2 instead' )
122122 DartObject ? firstAnnotationOfExact (
123123 Element element, {
124124 bool throwOnUnresolved = true ,
@@ -159,7 +159,7 @@ abstract class TypeChecker {
159159 ///
160160 /// Throws [UnresolvedAnnotationException] on unresolved annotations unless
161161 /// [throwOnUnresolved] is explicitly set to `false` (default is `true` ).
162- @deprecated
162+ @Deprecated ( 'use hasAnnotationOfExact2 instead' )
163163 bool hasAnnotationOfExact (Element element, {bool throwOnUnresolved = true }) =>
164164 firstAnnotationOfExact (element, throwOnUnresolved: throwOnUnresolved) !=
165165 null ;
@@ -175,7 +175,7 @@ abstract class TypeChecker {
175175 firstAnnotationOfExact2 (element, throwOnUnresolved: throwOnUnresolved) !=
176176 null ;
177177
178- @deprecated
178+ @Deprecated ( 'use _computeConstantValue2 instead' )
179179 DartObject ? _computeConstantValue (
180180 Element element,
181181 int annotationIndex, {
@@ -209,7 +209,7 @@ abstract class TypeChecker {
209209 ///
210210 /// Throws [UnresolvedAnnotationException] on unresolved annotations unless
211211 /// [throwOnUnresolved] is explicitly set to `false` (default is `true` ).
212- @deprecated
212+ @Deprecated ( 'use annotationsOf2 instead' )
213213 Iterable <DartObject > annotationsOf (
214214 Element element, {
215215 bool throwOnUnresolved = true ,
@@ -234,7 +234,7 @@ abstract class TypeChecker {
234234 throwOnUnresolved: throwOnUnresolved,
235235 );
236236
237- @deprecated
237+ @Deprecated ( 'use _annotationsWhere2 instead' )
238238 Iterable <DartObject > _annotationsWhere (
239239 Element element,
240240 bool Function (DartType ) predicate, {
@@ -277,7 +277,7 @@ abstract class TypeChecker {
277277 ///
278278 /// Throws [UnresolvedAnnotationException] on unresolved annotations unless
279279 /// [throwOnUnresolved] is explicitly set to `false` (default is `true` ).
280- @deprecated
280+ @Deprecated ( 'use annotationsOfExact2 instead' )
281281 Iterable <DartObject > annotationsOfExact (
282282 Element element, {
283283 bool throwOnUnresolved = true ,
@@ -303,7 +303,7 @@ abstract class TypeChecker {
303303 );
304304
305305 /// Returns `true` if the type of [element] can be assigned to this type.
306- @deprecated
306+ @Deprecated ( 'use isAssignableFrom2 instead' )
307307 bool isAssignableFrom (Element element) =>
308308 isExactly (element) ||
309309 (element is InterfaceElement && element.allSupertypes.any (isExactlyType));
@@ -321,7 +321,7 @@ abstract class TypeChecker {
321321 }
322322
323323 /// Returns `true` if representing the exact same class as [element] .
324- @deprecated
324+ @Deprecated ( 'use isExactly2 instead' )
325325 bool isExactly (Element element);
326326
327327 /// Returns `true` if representing the exact same class as [element] .
@@ -344,7 +344,7 @@ abstract class TypeChecker {
344344 ///
345345 /// This check only takes into account the *extends* hierarchy. If you wish
346346 /// to check mixins and interfaces, use [isAssignableFrom] .
347- @deprecated
347+ @Deprecated ( 'use isSuperOf2 instead' )
348348 bool isSuperOf (Element element) {
349349 if (element is InterfaceElement ) {
350350 var theSuper = element.supertype;
@@ -423,7 +423,7 @@ class _MirrorTypeChecker extends TypeChecker {
423423 TypeChecker get _computed =>
424424 _cache[this ] ?? = TypeChecker .fromUrl (_uriOf (reflectClass (_type)));
425425
426- @deprecated
426+ @Deprecated ( 'use isExactly2 instead' )
427427 @override
428428 bool isExactly (Element element) => _computed.isExactly (element);
429429
@@ -459,7 +459,7 @@ class _UriTypeChecker extends TypeChecker {
459459 uri.toString () ==
460460 (url is String ? url : normalizeUrl (url as Uri ).toString ());
461461
462- @deprecated
462+ @Deprecated ( 'use isExactly2 instead' )
463463 @override
464464 bool isExactly (Element element) => hasSameUrl (urlOfElement (element));
465465
@@ -475,7 +475,7 @@ class _AnyChecker extends TypeChecker {
475475
476476 const _AnyChecker (this ._checkers) : super ._();
477477
478- @deprecated
478+ @Deprecated ( 'use isExactly2 instead' )
479479 @override
480480 bool isExactly (Element element) => _checkers.any ((c) => c.isExactly (element));
481481
@@ -499,7 +499,7 @@ class UnresolvedAnnotationException implements Exception {
499499 /// May be `null` if the import library was not found.
500500 final SourceSpan ? annotationSource;
501501
502- @deprecated
502+ @Deprecated ( 'use annotatedElement2 instead' )
503503 Element get annotatedElement => annotatedElement2.asElement! ;
504504
505505 static SourceSpan ? _findSpan (Element2 annotatedElement, int annotationIndex) {
@@ -552,7 +552,7 @@ the version of `package:source_gen`, `package:analyzer` from `pubspec.lock`.
552552 }
553553
554554 /// Creates an exception from an annotation ([annotationIndex] ) that was not
555- /// resolvable while traversing [ Element2.metadata] on [annotatedElement] .
555+ /// resolvable while traversing ` Element2.metadata` on [annotatedElement] .
556556 factory UnresolvedAnnotationException ._from (
557557 Element2 annotatedElement,
558558 int annotationIndex,
0 commit comments