| 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 library engine.utilities.dart; | 5 library analyzer.src.generated.utilities_dart; |
| 6 | 6 |
| 7 import 'java_core.dart'; | 7 import 'package:analyzer/src/generated/java_core.dart'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Check whether [uri1] starts with (or 'is prefixed by') [uri2] by checking | 10 * Check whether [uri1] starts with (or 'is prefixed by') [uri2] by checking |
| 11 * path segments. | 11 * path segments. |
| 12 */ | 12 */ |
| 13 bool startsWith(Uri uri1, Uri uri2) { | 13 bool startsWith(Uri uri1, Uri uri2) { |
| 14 List<String> uri1Segments = uri1.pathSegments; | 14 List<String> uri1Segments = uri1.pathSegments; |
| 15 List<String> uri2Segments = uri2.pathSegments.toList(); | 15 List<String> uri2Segments = uri2.pathSegments.toList(); |
| 16 // Punt if empty (https://github.com/dart-lang/sdk/issues/24126) | 16 // Punt if empty (https://github.com/dart-lang/sdk/issues/24126) |
| 17 if (uri2Segments.isEmpty) { | 17 if (uri2Segments.isEmpty) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 final bool isOptional; | 56 final bool isOptional; |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * Initialize a newly created kind with the given state. | 59 * Initialize a newly created kind with the given state. |
| 60 * | 60 * |
| 61 * @param isOptional `true` if this is an optional parameter | 61 * @param isOptional `true` if this is an optional parameter |
| 62 */ | 62 */ |
| 63 const ParameterKind(String name, int ordinal, this.isOptional) | 63 const ParameterKind(String name, int ordinal, this.isOptional) |
| 64 : super(name, ordinal); | 64 : super(name, ordinal); |
| 65 } | 65 } |
| OLD | NEW |