Chromium Code Reviews| 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. | 5 /// Constants for use in metadata annotations. |
| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 /// Note that private methods with this annotation cannot be validly overridden | 49 /// Note that private methods with this annotation cannot be validly overridden |
| 50 /// outside of the library that defines the annotated method. | 50 /// outside of the library that defines the annotated method. |
| 51 /// | 51 /// |
| 52 /// Tools, such as the analyzer, can provide feedback if | 52 /// Tools, such as the analyzer, can provide feedback if |
| 53 /// * the annotation is associated with anything other than an instance method, | 53 /// * the annotation is associated with anything other than an instance method, |
| 54 /// or | 54 /// or |
| 55 /// * a method that overrides a method that has this annotation can return | 55 /// * a method that overrides a method that has this annotation can return |
| 56 /// without invoking the overridden method. | 56 /// without invoking the overridden method. |
| 57 const _MustCallSuper mustCallSuper = const _MustCallSuper(); | 57 const _MustCallSuper mustCallSuper = const _MustCallSuper(); |
| 58 | 58 |
| 59 /// Used to annotate a class declaration `c`. Indicates that any type arguments | |
|
Brian Wilkerson
2016/04/11 23:51:24
nit: class names are typically capitalized
pquitslund
2016/04/11 23:58:21
Fixed!
| |
| 60 /// declared on `c` are to be treated as optional. Tools such as the analyzer | |
| 61 /// and linter can use this information to suppress warnings that would | |
| 62 /// otherwise require type arguments to be provided for instances of `c`. | |
| 63 const _OptionalTypeArgs optionalTypeArgs = const _OptionalTypeArgs(); | |
| 64 | |
| 59 /// Used to annotate an instance member (method, getter, setter, operator, or | 65 /// Used to annotate an instance member (method, getter, setter, operator, or |
| 60 /// field) `m` in a class `C`. If the annotation is on a field it applies to the | 66 /// field) `m` in a class `C`. If the annotation is on a field it applies to the |
| 61 /// getter, and setter if appropriate, that are induced by the field. Indicates | 67 /// getter, and setter if appropriate, that are induced by the field. Indicates |
| 62 /// that `m` should only be invoked from instance methods of `C` or classes that | 68 /// that `m` should only be invoked from instance methods of `C` or classes that |
| 63 /// extend or mix in `C`, either directly or indirectly. Additionally indicates | 69 /// extend or mix in `C`, either directly or indirectly. Additionally indicates |
| 64 /// that `m` should only be invoked on `this`, whether explicitly or implicitly. | 70 /// that `m` should only be invoked on `this`, whether explicitly or implicitly. |
| 65 /// | 71 /// |
| 66 /// Tools, such as the analyzer, can provide feedback if | 72 /// Tools, such as the analyzer, can provide feedback if |
| 67 /// * the annotation is associated with anything other than an instance member, | 73 /// * the annotation is associated with anything other than an instance member, |
| 68 /// or | 74 /// or |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 } | 116 } |
| 111 | 117 |
| 112 class _Literal { | 118 class _Literal { |
| 113 const _Literal(); | 119 const _Literal(); |
| 114 } | 120 } |
| 115 | 121 |
| 116 class _MustCallSuper { | 122 class _MustCallSuper { |
| 117 const _MustCallSuper(); | 123 const _MustCallSuper(); |
| 118 } | 124 } |
| 119 | 125 |
| 126 class _OptionalTypeArgs { | |
| 127 const _OptionalTypeArgs(); | |
| 128 } | |
| 129 | |
| 120 class _Protected { | 130 class _Protected { |
| 121 const _Protected(); | 131 const _Protected(); |
| 122 } | 132 } |
| OLD | NEW |