| Index: pkg/analyzer/lib/src/generated/source.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
|
| index 6b876736622e01f114a62187a40d380129c07844..f5038312362b83ad90b495728684d0aa3460c375 100644
|
| --- a/pkg/analyzer/lib/src/generated/source.dart
|
| +++ b/pkg/analyzer/lib/src/generated/source.dart
|
| @@ -16,6 +16,11 @@ import 'java_engine.dart';
|
| import 'sdk.dart' show DartSdk;
|
|
|
| /**
|
| + * A function that is used to handle [ContentCache] entries.
|
| + */
|
| +typedef void ContentCacheVisitor(Source source, int stamp, String contents);
|
| +
|
| +/**
|
| * Instances of class `ContentCache` hold content used to override the default content of a
|
| * [Source].
|
| */
|
| @@ -33,6 +38,16 @@ class ContentCache {
|
| HashMap<Source, int> _stampMap = new HashMap<Source, int>();
|
|
|
| /**
|
| + * Visit all entries of this cache.
|
| + */
|
| + void accept(ContentCacheVisitor visitor) {
|
| + _contentMap.forEach((Source source, String contents) {
|
| + int stamp = _stampMap[source];
|
| + visitor(source, stamp, contents);
|
| + });
|
| + }
|
| +
|
| + /**
|
| * Return the contents of the given source, or `null` if this cache does not override the
|
| * contents of the source.
|
| *
|
|
|