Index: pkg/analyzer/lib/task/model.dart |
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart |
index 557a763d7a4993226327fefd71a2b54d322eb0ab..dd1062fc9f067fe46da68cdb94428656c1d56b27 100644 |
--- a/pkg/analyzer/lib/task/model.dart |
+++ b/pkg/analyzer/lib/task/model.dart |
@@ -457,6 +457,13 @@ abstract class ResultCachingPolicy<T> { |
*/ |
abstract class ResultDescriptor<V> { |
/** |
+ * A comparator that can be used to sort result descriptors by their name. |
+ */ |
+ static final Comparator<ResultDescriptor> SORT_BY_NAME = |
+ (ResultDescriptor first, ResultDescriptor second) => |
+ first.name.compareTo(second.name); |
+ |
+ /** |
* Initialize a newly created analysis result to have the given [name] and |
* [defaultValue]. |
* |