OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 | 3 |
4 library engine.source; | 4 library engine.source; |
5 | 5 |
6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
7 import 'sdk.dart' show DartSdk; | 7 import 'sdk.dart' show DartSdk; |
8 import 'engine.dart' show AnalysisContext; | 8 import 'engine.dart' show AnalysisContext; |
9 | 9 |
10 /** | 10 /** |
11 * Instances of interface `LocalSourcePredicate` are used to determine if the gi
ven | 11 * Instances of interface `LocalSourcePredicate` are used to determine if the gi
ven |
12 * [Source] is "local" in some sense, so can be updated. | 12 * [Source] is "local" in some sense, so can be updated. |
13 * | 13 * |
14 * @coverage dart.engine.source | 14 * @coverage dart.engine.source |
15 */ | 15 */ |
16 abstract class LocalSourcePredicate { | 16 abstract class LocalSourcePredicate { |
17 /** | 17 /** |
18 * Instance of [LocalSourcePredicate] that always returns `false`. | 18 * Instance of [LocalSourcePredicate] that always returns `false`. |
19 */ | 19 */ |
20 static final LocalSourcePredicate _FALSE = new LocalSourcePredicate_15(); | 20 static final LocalSourcePredicate FALSE = new LocalSourcePredicate_15(); |
21 | 21 |
22 /** | 22 /** |
23 * Instance of [LocalSourcePredicate] that always returns `true`. | 23 * Instance of [LocalSourcePredicate] that always returns `true`. |
24 */ | 24 */ |
25 static final LocalSourcePredicate _TRUE = new LocalSourcePredicate_16(); | 25 static final LocalSourcePredicate TRUE = new LocalSourcePredicate_16(); |
26 | 26 |
27 /** | 27 /** |
28 * Instance of [LocalSourcePredicate] that returns `true` for all [Source]s | 28 * Instance of [LocalSourcePredicate] that returns `true` for all [Source]s |
29 * except of SDK. | 29 * except of SDK. |
30 */ | 30 */ |
31 static final LocalSourcePredicate _NOT_SDK = new LocalSourcePredicate_17(); | 31 static final LocalSourcePredicate NOT_SDK = new LocalSourcePredicate_17(); |
32 | 32 |
33 /** | 33 /** |
34 * Determines if the given [Source] is local. | 34 * Determines if the given [Source] is local. |
35 * | 35 * |
36 * @param source the [Source] to analyze | 36 * @param source the [Source] to analyze |
37 * @return `true` if the given [Source] is local | 37 * @return `true` if the given [Source] is local |
38 */ | 38 */ |
39 bool isLocal(Source source); | 39 bool isLocal(Source source); |
40 } | 40 } |
41 | 41 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 /** | 81 /** |
82 * Initialize a newly created source factory. | 82 * Initialize a newly created source factory. |
83 * | 83 * |
84 * @param contentCache the cache holding content used to override the default
content of a source | 84 * @param contentCache the cache holding content used to override the default
content of a source |
85 * @param resolvers the resolvers used to resolve absolute URI's | 85 * @param resolvers the resolvers used to resolve absolute URI's |
86 */ | 86 */ |
87 SourceFactory.con1(ContentCache contentCache, List<UriResolver> resolvers) { | 87 SourceFactory.con1(ContentCache contentCache, List<UriResolver> resolvers) { |
88 this.contentCache = contentCache; | 88 this.contentCache = contentCache; |
89 this._resolvers = resolvers; | 89 this._resolvers = resolvers; |
90 this._localSourcePredicate = LocalSourcePredicate._NOT_SDK; | 90 this._localSourcePredicate = LocalSourcePredicate.NOT_SDK; |
91 } | 91 } |
92 | 92 |
93 /** | 93 /** |
94 * Initialize a newly created source factory. | 94 * Initialize a newly created source factory. |
95 * | 95 * |
96 * @param resolvers the resolvers used to resolve absolute URI's | 96 * @param resolvers the resolvers used to resolve absolute URI's |
97 */ | 97 */ |
98 SourceFactory.con2(List<UriResolver> resolvers) : this.con1(new ContentCache()
, resolvers); | 98 SourceFactory.con2(List<UriResolver> resolvers) : this.con1(new ContentCache()
, resolvers); |
99 | 99 |
100 /** | 100 /** |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 String setContents(Source source, String contents) { | 882 String setContents(Source source, String contents) { |
883 if (contents == null) { | 883 if (contents == null) { |
884 _stampMap.remove(source); | 884 _stampMap.remove(source); |
885 return _contentMap.remove(source); | 885 return _contentMap.remove(source); |
886 } else { | 886 } else { |
887 _stampMap[source] = JavaSystem.currentTimeMillis(); | 887 _stampMap[source] = JavaSystem.currentTimeMillis(); |
888 return javaMapPut(_contentMap, source, contents); | 888 return javaMapPut(_contentMap, source, contents); |
889 } | 889 } |
890 } | 890 } |
891 } | 891 } |
OLD | NEW |