Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: pkg/analyzer/lib/task/model.dart

Issue 1012993002: Rename ContributionPoint and error result (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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 library analyzer.task.model; 5 library analyzer.task.model;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; 9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
10 import 'package:analyzer/src/generated/java_engine.dart'; 10 import 'package:analyzer/src/generated/java_engine.dart';
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 /** 224 /**
225 * A [ResultDescriptor] that denotes an analysis result that is a union of 225 * A [ResultDescriptor] that denotes an analysis result that is a union of
226 * one or more other results. 226 * one or more other results.
227 * 227 *
228 * Clients are not expected to subtype this class. 228 * Clients are not expected to subtype this class.
229 */ 229 */
230 abstract class ContributionPoint<V> extends ResultDescriptor<V> { 230 abstract class CompositeResultDescriptor<V> extends ResultDescriptor<V> {
231 /** 231 /**
232 * Initialize a newly created contribution point to have the given [name]. 232 * Initialize a newly created composite result to have the given [name].
233 */ 233 */
234 factory ContributionPoint(String name) = ContributionPointImpl; 234 factory CompositeResultDescriptor(
235 String name) = CompositeResultDescriptorImpl;
235 236
236 /** 237 /**
237 * Return a list containing the descriptors of the results that are unioned 238 * Return a list containing the descriptors of the results that are unioned
238 * together to comprise the value of this result. 239 * together to compose the value of this result.
239 * 240 *
240 * Clients must not modify the returned list. 241 * Clients must not modify the returned list.
241 */ 242 */
242 List<ResultDescriptor<V>> get contributors; 243 List<ResultDescriptor<V>> get contributors;
243 } 244 }
244 245
245 /** 246 /**
246 * A description of an analysis result that can be computed by an [AnalysisTask] . 247 * A description of an analysis result that can be computed by an [AnalysisTask] .
247 * 248 *
248 * Clients are not expected to subtype this class. 249 * Clients are not expected to subtype this class.
249 */ 250 */
250 abstract class ResultDescriptor<V> { 251 abstract class ResultDescriptor<V> {
251 /** 252 /**
252 * Initialize a newly created analysis result to have the given [name]. If a 253 * Initialize a newly created analysis result to have the given [name]. If a
253 * contribution point is specified, then this result will contribute to it. 254 * composite result is specified, then this result will contribute to it.
254 */ 255 */
255 factory ResultDescriptor(String name, V defaultValue, 256 factory ResultDescriptor(String name, V defaultValue,
256 {ContributionPoint<V> contributesTo}) = ResultDescriptorImpl; 257 {CompositeResultDescriptor<V> contributesTo}) = ResultDescriptorImpl;
257 258
258 /** 259 /**
259 * Return the default value for results described by this descriptor. 260 * Return the default value for results described by this descriptor.
260 */ 261 */
261 V get defaultValue; 262 V get defaultValue;
262 263
263 /** 264 /**
264 * Return the name of this descriptor. 265 * Return the name of this descriptor.
265 */ 266 */
266 String get name; 267 String get name;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 * be computed, or `false` if the inputs have been computed. 374 * be computed, or `false` if the inputs have been computed.
374 * 375 *
375 * It is safe to invoke [moveNext] after it has returned `false`. In this case 376 * It is safe to invoke [moveNext] after it has returned `false`. In this case
376 * [moveNext] has no effect and will again return `false`. 377 * [moveNext] has no effect and will again return `false`.
377 * 378 *
378 * Throws a [StateError] if the value of the current result has not been 379 * Throws a [StateError] if the value of the current result has not been
379 * provided using [currentValue]. 380 * provided using [currentValue].
380 */ 381 */
381 bool moveNext(); 382 bool moveNext();
382 } 383 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698