| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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 /// Constants for use in metadata annotations such as `@protected`. | 5 /// Constants for use in metadata annotations such as `@protected`. |
| 6 /// | 6 /// |
| 7 /// See also `@deprecated` and `@override` in the `dart:core` library. | 7 /// See also `@deprecated` and `@override` in the `dart:core` library. |
| 8 /// | 8 /// |
| 9 /// Annotations provide semantic information that tools can use to provide a | 9 /// Annotations provide semantic information that tools can use to provide a |
| 10 /// better user experience. For example, an IDE might not autocomplete the name | 10 /// better user experience. For example, an IDE might not autocomplete the name |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 /// `this`. | 60 /// `this`. |
| 61 const _Protected protected = const _Protected(); | 61 const _Protected protected = const _Protected(); |
| 62 | 62 |
| 63 /// Used to annotate a named parameter `p` in a method or function `f`. | 63 /// Used to annotate a named parameter `p` in a method or function `f`. |
| 64 /// Indicates that every invocation of `f` must include an argument | 64 /// Indicates that every invocation of `f` must include an argument |
| 65 /// corresponding to `p`, despite the fact that `p` would otherwise be an | 65 /// corresponding to `p`, despite the fact that `p` would otherwise be an |
| 66 /// optional parameter. | 66 /// optional parameter. |
| 67 /// | 67 /// |
| 68 /// Tools, such as the analyzer, can provide feedback if | 68 /// Tools, such as the analyzer, can provide feedback if |
| 69 /// * the annotation is associated with anything other than a named parameter, | 69 /// * the annotation is associated with anything other than a named parameter, |
| 70 /// or | 70 /// * the annotation is associated with a named parameter in a method `m1` that |
| 71 /// overrides a method `m0` and `m0` defines a named parameter with the same |
| 72 /// name that does not have this annotation, or |
| 71 /// * an invocation of a method or function does not include an argument | 73 /// * an invocation of a method or function does not include an argument |
| 72 /// corresponding to a named parameter that has this annotation. | 74 /// corresponding to a named parameter that has this annotation. |
| 73 const _Required required = const _Required(); | 75 const _Required required = const _Required(); |
| 74 | 76 |
| 75 class _Factory { | 77 class _Factory { |
| 76 const _Factory(); | 78 const _Factory(); |
| 77 } | 79 } |
| 78 | 80 |
| 79 class _MustCallSuper { | 81 class _MustCallSuper { |
| 80 const _MustCallSuper(); | 82 const _MustCallSuper(); |
| 81 } | 83 } |
| 82 | 84 |
| 83 class _Protected { | 85 class _Protected { |
| 84 const _Protected(); | 86 const _Protected(); |
| 85 } | 87 } |
| 86 | 88 |
| 87 class _Required { | 89 class _Required { |
| 88 const _Required(); | 90 const _Required(); |
| 89 } | 91 } |
| OLD | NEW |