Chromium Code Reviews| Index: pkg/analyzer/lib/src/dart/ast/uri_validation_code.dart |
| diff --git a/pkg/analyzer/lib/src/dart/ast/uri_validation_code.dart b/pkg/analyzer/lib/src/dart/ast/uri_validation_code.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7cd0b2b3801101ab4ab677b09a844551e9c250e3 |
| --- /dev/null |
| +++ b/pkg/analyzer/lib/src/dart/ast/uri_validation_code.dart |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +import 'package:analyzer/dart/ast/ast.dart'; |
| + |
| +/** |
| + * Validation codes returned by [UriBasedDirective.validate]. |
| + */ |
| +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.
|
| + static const UriValidationCode INVALID_URI = |
| + const UriValidationCodeImpl('INVALID_URI'); |
| + |
| + static const UriValidationCode URI_WITH_INTERPOLATION = |
| + const UriValidationCodeImpl('URI_WITH_INTERPOLATION'); |
| + |
| + static const UriValidationCode URI_WITH_DART_EXT_SCHEME = |
| + const UriValidationCodeImpl('URI_WITH_DART_EXT_SCHEME'); |
| + |
| + /** |
| + * The name of the validation code. |
| + */ |
| + final String name; |
| + |
| + /** |
| + * Initialize a newly created validation code to have the given [name]. |
| + */ |
| + const UriValidationCodeImpl(this.name); |
| + |
| + @override |
| + String toString() => name; |
| +} |