Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 import 'package:analyzer/dart/ast/ast.dart'; | |
| 6 | |
| 7 /** | |
| 8 * Validation codes returned by [UriBasedDirective.validate]. | |
| 9 */ | |
| 10 class UriValidationCodeImpl implements UriValidationCode { | |
|
Brian Wilkerson
2016/11/23 15:58:18
I would prefer to remove the method 'validate' fro
Paul Berry
2016/11/24 15:03:17
Done.
| |
| 11 static const UriValidationCode INVALID_URI = | |
| 12 const UriValidationCodeImpl('INVALID_URI'); | |
| 13 | |
| 14 static const UriValidationCode URI_WITH_INTERPOLATION = | |
| 15 const UriValidationCodeImpl('URI_WITH_INTERPOLATION'); | |
| 16 | |
| 17 static const UriValidationCode URI_WITH_DART_EXT_SCHEME = | |
| 18 const UriValidationCodeImpl('URI_WITH_DART_EXT_SCHEME'); | |
| 19 | |
| 20 /** | |
| 21 * The name of the validation code. | |
| 22 */ | |
| 23 final String name; | |
| 24 | |
| 25 /** | |
| 26 * Initialize a newly created validation code to have the given [name]. | |
| 27 */ | |
| 28 const UriValidationCodeImpl(this.name); | |
| 29 | |
| 30 @override | |
| 31 String toString() => name; | |
| 32 } | |
| OLD | NEW |