| 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 'dart:uri'; | 6 import 'dart:uri'; |
| 7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Instances of the class {@code SourceFactory} resolve possibly relative URI's
against an existing{@link Source source}. | 10 * Instances of the class {@code SourceFactory} resolve possibly relative URI's
against an existing{@link Source source}. |
| 11 * @coverage dart.engine.source | 11 * @coverage dart.engine.source |
| 12 */ | 12 */ |
| 13 class SourceFactory { | 13 class SourceFactory { |
| 14 /** | 14 /** |
| 15 * The resolvers used to resolve absolute URI's. | 15 * The resolvers used to resolve absolute URI's. |
| 16 */ | 16 */ |
| 17 List<UriResolver> _resolvers; | 17 List<UriResolver> _resolvers; |
| 18 /** | 18 /** |
| 19 * A cache of content used to override the default content of a source. | 19 * A cache of content used to override the default content of a source. |
| 20 */ | 20 */ |
| 21 ContentCache _contentCache; | 21 ContentCache _contentCache; |
| 22 /** | 22 /** |
| 23 * Initialize a newly created source factory. | 23 * Initialize a newly created source factory. |
| 24 * @param contentCache the cache holding content used to override the default
content of a source. | 24 * @param contentCache the cache holding content used to override the default
content of a source. |
| 25 * @param resolvers the resolvers used to resolve absolute URI's | 25 * @param resolvers the resolvers used to resolve absolute URI's |
| 26 */ | 26 */ |
| 27 SourceFactory.con1(ContentCache contentCache2, List<UriResolver> resolvers2) { | 27 SourceFactory.con1(ContentCache contentCache2, List<UriResolver> resolvers2) { |
| 28 _jtd_constructor_289_impl(contentCache2, resolvers2); | 28 _jtd_constructor_300_impl(contentCache2, resolvers2); |
| 29 } | 29 } |
| 30 _jtd_constructor_289_impl(ContentCache contentCache2, List<UriResolver> resolv
ers2) { | 30 _jtd_constructor_300_impl(ContentCache contentCache2, List<UriResolver> resolv
ers2) { |
| 31 this._contentCache = contentCache2; | 31 this._contentCache = contentCache2; |
| 32 this._resolvers = resolvers2; | 32 this._resolvers = resolvers2; |
| 33 } | 33 } |
| 34 /** | 34 /** |
| 35 * Initialize a newly created source factory. | 35 * Initialize a newly created source factory. |
| 36 * @param resolvers the resolvers used to resolve absolute URI's | 36 * @param resolvers the resolvers used to resolve absolute URI's |
| 37 */ | 37 */ |
| 38 SourceFactory.con2(List<UriResolver> resolvers) { | 38 SourceFactory.con2(List<UriResolver> resolvers) { |
| 39 _jtd_constructor_290_impl(resolvers); | 39 _jtd_constructor_301_impl(resolvers); |
| 40 } | 40 } |
| 41 _jtd_constructor_290_impl(List<UriResolver> resolvers) { | 41 _jtd_constructor_301_impl(List<UriResolver> resolvers) { |
| 42 _jtd_constructor_289_impl(new ContentCache(), resolvers); | 42 _jtd_constructor_300_impl(new ContentCache(), resolvers); |
| 43 } | 43 } |
| 44 /** | 44 /** |
| 45 * Return a source object representing the given absolute URI, or {@code null}
if the URI is not a | 45 * Return a source object representing the given absolute URI, or {@code null}
if the URI is not a |
| 46 * valid URI or if it is not an absolute URI. | 46 * valid URI or if it is not an absolute URI. |
| 47 * @param absoluteUri the absolute URI to be resolved | 47 * @param absoluteUri the absolute URI to be resolved |
| 48 * @return a source object representing the absolute URI | 48 * @return a source object representing the absolute URI |
| 49 */ | 49 */ |
| 50 Source forUri(String absoluteUri) { | 50 Source forUri(String absoluteUri) { |
| 51 try { | 51 try { |
| 52 Uri uri = new Uri(absoluteUri); | 52 Uri uri = new Uri(absoluteUri); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 void setContents(Source source, String contents) { | 539 void setContents(Source source, String contents) { |
| 540 if (contents == null) { | 540 if (contents == null) { |
| 541 _contentMap.remove(source); | 541 _contentMap.remove(source); |
| 542 _stampMap.remove(source); | 542 _stampMap.remove(source); |
| 543 } else { | 543 } else { |
| 544 _contentMap[source] = contents; | 544 _contentMap[source] = contents; |
| 545 _stampMap[source] = JavaSystem.currentTimeMillis(); | 545 _stampMap[source] = JavaSystem.currentTimeMillis(); |
| 546 } | 546 } |
| 547 } | 547 } |
| 548 } | 548 } |
| OLD | NEW |