OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
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. | |
4 | |
5 library analysis_server.analysis.occurrences_core; | |
Brian Wilkerson
2015/09/11 20:26:24
I would prefer to have this in a sub-directory nam
| |
6 | |
7 import 'package:analysis_server/src/protocol.dart' show Element, Occurrences; | |
8 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | |
9 import 'package:analyzer/src/generated/source.dart' show Source; | |
10 | |
11 /** | |
12 * An object used to produce occurrences. | |
13 * | |
14 * Clients are expected to subtype this class when implementing plugins. | |
15 */ | |
16 abstract class OccurrencesContributor { | |
17 /** | |
18 * Contribute occurrences into the given [collector]. | |
19 * The [context] can be used to get analysis results. | |
20 */ | |
21 void computeOccurrences( | |
22 OccurrencesCollector collector, AnalysisContext context, Source source); | |
23 } | |
24 | |
25 /** | |
26 * An object that [OccurrencesContributor]s use to record occurrences into. | |
27 * | |
28 * Clients are not expected to subtype this class. | |
29 */ | |
30 abstract class OccurrencesCollector { | |
31 /** | |
32 * Record a new element occurrences. | |
33 */ | |
34 void addOccurrences(Occurrences occurrences); | |
35 } | |
OLD | NEW |