| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/analysis/results.dart'; | 7 import 'package:analyzer/dart/analysis/results.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/exception/exception.dart'; | 9 import 'package:analyzer/exception/exception.dart'; |
| 10 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart'; | 10 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart'; |
| 11 import 'package:analyzer/src/generated/resolver.dart'; | 11 import 'package:analyzer/src/generated/resolver.dart'; |
| 12 import 'package:analyzer/src/generated/source.dart'; | 12 import 'package:analyzer/src/generated/source.dart'; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * A consistent view of the results of analyzing one or more files. | 15 * A consistent view of the results of analyzing one or more files. |
| 16 * | 16 * |
| 17 * The methods in this class that return analysis results will throw an | 17 * The methods in this class that return analysis results will throw an |
| 18 * [InconsistentAnalysisException] if the result to be returned might be | 18 * [InconsistentAnalysisException] if the result to be returned might be |
| 19 * inconsistent with any previously returned results. | 19 * inconsistent with any previously returned results. |
| 20 * | 20 * |
| 21 * Clients may not extend, implement or mix-in this class. | 21 * Clients may not extend, implement or mix-in this class. |
| 22 */ | 22 */ |
| 23 abstract class AnalysisSession { | 23 abstract class AnalysisSession { |
| 24 /** | 24 /** |
| 25 * Return the source factory used to resolve URIs. |
| 26 */ |
| 27 SourceFactory get sourceFactory; |
| 28 |
| 29 /** |
| 25 * Return a type provider that is consistent with the results returned by this | 30 * Return a type provider that is consistent with the results returned by this |
| 26 * session. | 31 * session. |
| 27 */ | 32 */ |
| 28 Future<TypeProvider> get typeProvider; | 33 Future<TypeProvider> get typeProvider; |
| 29 | 34 |
| 30 /** | 35 /** |
| 31 * Return the type system being used by this session. | 36 * Return the type system being used by this session. |
| 32 */ | 37 */ |
| 33 Future<TypeSystem> get typeSystem; | 38 Future<TypeSystem> get typeSystem; |
| 34 | 39 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 * might be inconsistent with any previously returned results. | 105 * might be inconsistent with any previously returned results. |
| 101 */ | 106 */ |
| 102 class InconsistentAnalysisException extends AnalysisException { | 107 class InconsistentAnalysisException extends AnalysisException { |
| 103 /** | 108 /** |
| 104 * Initialize a newly created exception to have the given [message] and | 109 * Initialize a newly created exception to have the given [message] and |
| 105 * [cause]. | 110 * [cause]. |
| 106 */ | 111 */ |
| 107 InconsistentAnalysisException([String message, CaughtException cause]) | 112 InconsistentAnalysisException([String message, CaughtException cause]) |
| 108 : super(message, cause); | 113 : super(message, cause); |
| 109 } | 114 } |
| OLD | NEW |