| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.source; | 8 library engine.source; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 * Return a source object that is equal to the source object used to obtain th
e given encoding. | 655 * Return a source object that is equal to the source object used to obtain th
e given encoding. |
| 656 * | 656 * |
| 657 * @param encoding the encoding of a source object | 657 * @param encoding the encoding of a source object |
| 658 * @return a source object that is described by the given encoding | 658 * @return a source object that is described by the given encoding |
| 659 * @throws IllegalArgumentException if the argument is not a valid encoding | 659 * @throws IllegalArgumentException if the argument is not a valid encoding |
| 660 * See [Source.encoding]. | 660 * See [Source.encoding]. |
| 661 */ | 661 */ |
| 662 Source fromEncoding(String encoding) { | 662 Source fromEncoding(String encoding) { |
| 663 Source source = forUri(encoding); | 663 Source source = forUri(encoding); |
| 664 if (source == null) { | 664 if (source == null) { |
| 665 throw new IllegalArgumentException("Invalid source encoding: $encoding"); | 665 throw new IllegalArgumentException("Invalid source encoding: '$encoding'")
; |
| 666 } | 666 } |
| 667 return source; | 667 return source; |
| 668 } | 668 } |
| 669 | 669 |
| 670 /** | 670 /** |
| 671 * Determines if the given [Source] is local. | 671 * Determines if the given [Source] is local. |
| 672 * | 672 * |
| 673 * @param source the [Source] to analyze | 673 * @param source the [Source] to analyze |
| 674 * @return `true` if the given [Source] is local | 674 * @return `true` if the given [Source] is local |
| 675 */ | 675 */ |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 984 |
| 985 /** | 985 /** |
| 986 * Return an absolute URI that represents the given source, or `null` if a val
id URI cannot | 986 * Return an absolute URI that represents the given source, or `null` if a val
id URI cannot |
| 987 * be computed. | 987 * be computed. |
| 988 * | 988 * |
| 989 * @param source the source to get URI for | 989 * @param source the source to get URI for |
| 990 * @return the absolute URI representing the given source | 990 * @return the absolute URI representing the given source |
| 991 */ | 991 */ |
| 992 Uri restoreAbsolute(Source source) => null; | 992 Uri restoreAbsolute(Source source) => null; |
| 993 } | 993 } |
| OLD | NEW |