11// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4- // ignore_for_file: deprecated_member_use
54
65import 'package:analyzer/dart/analysis/results.dart' ;
76import 'package:analyzer/dart/analysis/session.dart' ;
87import 'package:analyzer/dart/ast/ast.dart' ;
9- import 'package:analyzer/dart/element/element .dart' ;
8+ import 'package:analyzer/dart/element/element2 .dart' ;
109import 'package:analyzer/error/error.dart' ;
1110
1211import '../asset/id.dart' ;
@@ -29,9 +28,9 @@ abstract class Resolver {
2928 /// - Every public `dart:` library part of the SDK.
3029 /// - All libraries recursively accessible from the mentioned sources, for
3130 /// instance because due to imports or exports.
32- Stream <LibraryElement > get libraries;
31+ Stream <LibraryElement2 > get libraries;
3332
34- /// Returns the parsed [AstNode] for [Element ] .
33+ /// Returns the parsed [AstNode] for [fragment ] .
3534 ///
3635 /// This should always be preferred over using the [AnalysisSession]
3736 /// directly, because it avoids [InconsistentAnalysisException] issues.
@@ -42,7 +41,7 @@ abstract class Resolver {
4241 /// Returns `null` if the ast node can not be found. This can happen if an
4342 /// element is coming from a summary, or is unavailable for some other
4443 /// reason.
45- Future <AstNode ?> astNodeFor (Element element , {bool resolve = false });
44+ Future <AstNode ?> astNodeFor (Fragment fragment , {bool resolve = false });
4645
4746 /// Returns a parsed AST structor representing the file defined in [assetId] .
4847 ///
@@ -61,7 +60,7 @@ abstract class Resolver {
6160 /// * Throws [NonLibraryAssetException] if [assetId] is not a Dart library.
6261 /// * If the [assetId] has syntax errors, and [allowSyntaxErrors] is set to
6362 /// `false` (the default), throws a [SyntaxErrorInAssetException] .
64- Future <LibraryElement > libraryFor (
63+ Future <LibraryElement2 > libraryFor (
6564 AssetId assetId, {
6665 bool allowSyntaxErrors = false ,
6766 });
@@ -76,7 +75,7 @@ abstract class Resolver {
7675 /// **NOTE**: In general, its recommended to use [libraryFor] with an absolute
7776 /// asset id instead of a named identifier that has the possibility of not
7877 /// being unique.
79- Future <LibraryElement ?> findLibraryByName (String libraryName);
78+ Future <LibraryElement2 ?> findLibraryByName (String libraryName);
8079
8180 /// Returns the [AssetId] of the Dart library or part declaring [element] .
8281 ///
@@ -86,7 +85,7 @@ abstract class Resolver {
8685 ///
8786 /// The returned asset is not necessarily the asset that should be imported to
8887 /// use the element, it may be a part file instead of the library.
89- Future <AssetId > assetIdForElement (Element element);
88+ Future <AssetId > assetIdForElement (Element2 element);
9089}
9190
9291/// A resolver that should be manually released at the end of a build step.
0 commit comments