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

Unified Diff: pkg/analyzer/lib/task/model.dart

Issue 1052053002: Resolve type hierarchies for all units of the library's import closure. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/inputs.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/task/model.dart
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 4da15afe901fa342d1e65b9f2291c1b4a304320d..f05b0e887e9c3c5fc507d02e9d955e05a2d685d8 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -34,6 +34,11 @@ typedef Map<String, TaskInput> CreateTaskInputs(AnalysisTarget target);
typedef TaskInput<E> UnaryFunction<B, E>(B object);
/**
+ * TODO
Brian Wilkerson 2015/04/01 22:13:08 Did you intend to leave this TODO?
+ */
+typedef TaskInput<E> BinaryFunction<K, V, E>(K key, V value);
+
+/**
* An [AnalysisTarget] wrapper for an [AnalysisContext].
*/
class AnalysisContextTarget implements AnalysisTarget {
@@ -292,7 +297,7 @@ abstract class ListTaskInput<E> extends TaskInput<List<E>> {
* elements of this input and whose values are the result of passing the
* corresponding key to the [mapper] function.
*/
- TaskInput<Map<E, dynamic /*V*/ >> toMap(
+ MapTaskInput<E, dynamic /*V*/ > toMap(
UnaryFunction<E, dynamic /*<V>*/ > mapper);
/**
@@ -300,11 +305,27 @@ abstract class ListTaskInput<E> extends TaskInput<List<E>> {
* elements of this input and whose values are the [valueResult]'s associated
* with those elements.
*/
- TaskInput<Map<AnalysisTarget, dynamic /*V*/ >> toMapOf(
+ MapTaskInput<AnalysisTarget, dynamic /*V*/ > toMapOf(
ResultDescriptor /*<V>*/ valueResult);
}
/**
+ * A description of an input with a [Map] based values. TODO
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class MapTaskInput<K, V> extends TaskInput<Map<K, V>> {
+ /**
+ * [V] must be a [List].
+ * Return a task input that can be used to compute a list whose elements are
+ * the result of passing keys [K] and the corresponding elements of [V] to
+ * the [mapper] function.
+ */
+ TaskInput<List /*<E>*/ > toFlattenList(
+ BinaryFunction<K, dynamic /*element of V*/, dynamic /*<E>*/ > mapper);
+}
+
+/**
* A description of an analysis result that can be computed by an [AnalysisTask].
*
* Clients are not expected to subtype this class.
« no previous file with comments | « pkg/analyzer/lib/src/task/inputs.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698