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 'package:analyzer/dart/ast/ast.dart'; | 5 import 'package:analyzer/dart/ast/ast.dart'; |
6 import 'package:analyzer/dart/element/element.dart'; | 6 import 'package:analyzer/dart/element/element.dart'; |
7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
| 8 import 'package:analyzer/src/generated/resolver.dart'; |
8 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
9 | 10 |
10 /** | 11 /** |
11 * The result of performing some kind of analysis on a single file. Every result | 12 * The result of performing some kind of analysis on a single file. Every result |
12 * that implements this interface will also implement a sub-interface. | 13 * that implements this interface will also implement a sub-interface. |
13 * | 14 * |
14 * Clients may not extend, implement or mix-in this class. | 15 * Clients may not extend, implement or mix-in this class. |
15 */ | 16 */ |
16 abstract class AnalysisResult { | 17 abstract class AnalysisResult { |
17 /** | 18 /** |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 * | 80 * |
80 * Clients may not extend, implement or mix-in this class. | 81 * Clients may not extend, implement or mix-in this class. |
81 */ | 82 */ |
82 abstract class ResolveResult implements AnalysisResultWithErrors { | 83 abstract class ResolveResult implements AnalysisResultWithErrors { |
83 /** | 84 /** |
84 * The content of the file that was scanned, parsed and resolved. | 85 * The content of the file that was scanned, parsed and resolved. |
85 */ | 86 */ |
86 String get content; | 87 String get content; |
87 | 88 |
88 /** | 89 /** |
| 90 * The element representing the library containing the compilation [unit]. |
| 91 */ |
| 92 LibraryElement get libraryElement; |
| 93 |
| 94 /** |
| 95 * The type provider used when resolving the compilation [unit]. |
| 96 */ |
| 97 TypeProvider get typeProvider; |
| 98 |
| 99 /** |
89 * The fully resolved compilation unit for the [content]. | 100 * The fully resolved compilation unit for the [content]. |
90 */ | 101 */ |
91 CompilationUnit get unit; | 102 CompilationUnit get unit; |
92 } | 103 } |
93 | 104 |
94 /** | 105 /** |
95 * An indication of whether an analysis result is valid, and if not why. | 106 * An indication of whether an analysis result is valid, and if not why. |
96 */ | 107 */ |
97 enum ResultState { | 108 enum ResultState { |
98 /** | 109 /** |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 * when given the path to the compilation unit represented by the [element]. | 142 * when given the path to the compilation unit represented by the [element]. |
132 * | 143 * |
133 * The signature is based on the APIs of the files of the library (including | 144 * The signature is based on the APIs of the files of the library (including |
134 * the file itself), and the transitive closure of files imported and exported | 145 * the file itself), and the transitive closure of files imported and exported |
135 * by the library. If the signature of a file has not changed, then there have | 146 * by the library. If the signature of a file has not changed, then there have |
136 * been no changes that would cause any files that depend on it to need to be | 147 * been no changes that would cause any files that depend on it to need to be |
137 * re-analyzed. | 148 * re-analyzed. |
138 */ | 149 */ |
139 String get signature; | 150 String get signature; |
140 } | 151 } |
OLD | NEW |