| Index: pkg/analyzer/lib/src/task/inputs.dart
|
| diff --git a/pkg/analyzer/lib/src/task/inputs.dart b/pkg/analyzer/lib/src/task/inputs.dart
|
| index 425869ff462b91d704d8f62b21566db864be0ff8..bba4f71674ae968bd77a68fbdfc8f538b7ff51db 100644
|
| --- a/pkg/analyzer/lib/src/task/inputs.dart
|
| +++ b/pkg/analyzer/lib/src/task/inputs.dart
|
| @@ -16,6 +16,42 @@ import 'package:analyzer/task/model.dart';
|
| typedef TaskInput<E> GenerateTaskInputs<B, E>(B object);
|
|
|
| /**
|
| + * An input to an [AnalysisTask] that is computed by accessing a single result
|
| + * defined on a single target.
|
| + */
|
| +class ListTaskInputImpl<E> extends SimpleTaskInput<List<E>>
|
| + implements ListTaskInput<E> {
|
| + /**
|
| + * Initialize a newly created task input that computes the input by accessing
|
| + * the given [result] associated with the given [target].
|
| + */
|
| + ListTaskInputImpl(AnalysisTarget target, ResultDescriptor<List<E>> result)
|
| + : super(target, result);
|
| +
|
| + @override
|
| + TaskInput<List /*<V>*/ > toList(UnaryFunction<E, Object /*<V>*/ > mapper) {
|
| + return new ListToListTaskInput<E, Object /*V*/ >(this, mapper);
|
| + }
|
| +
|
| + @override
|
| + TaskInput<List /*<V>*/ > toListOf(ResultDescriptor /*<V>*/ valueResult) {
|
| + return (this as ListTaskInputImpl<AnalysisTarget>).toList(valueResult.of);
|
| + }
|
| +
|
| + @override
|
| + TaskInput<Map<E, Object /*V*/ >> toMap(
|
| + UnaryFunction<E, Object /*<V>*/ > mapper) {
|
| + return new ListToMapTaskInput<E, Object /*V*/ >(this, mapper);
|
| + }
|
| +
|
| + @override
|
| + TaskInput<Map<AnalysisTarget, Object /*V*/ >> toMapOf(
|
| + ResultDescriptor /*<V>*/ valueResult) {
|
| + return (this as ListTaskInputImpl<AnalysisTarget>).toMap(valueResult.of);
|
| + }
|
| +}
|
| +
|
| +/**
|
| * An input to an [AnalysisTask] that is computed by the following steps. First
|
| * another (base) task input is used to compute a [List]-valued result. An input
|
| * generator function is then used to map each element of that list to a task
|
|
|