Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: pkg/meta/lib/meta.dart

Issue 1719353002: Define protected to apply to fields (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: additional changes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 /// of a function that's been marked `@deprecated`, or it might display the 11 /// of a function that's been marked `@deprecated`, or it might display the
12 /// function's name differently. 12 /// function's name differently.
13 /// 13 ///
14 /// For information on installing and importing this library, see the 14 /// For information on installing and importing this library, see the
15 /// [meta package on pub.dartlang.org] (http://pub.dartlang.org/packages/meta). 15 /// [meta package on pub.dartlang.org] (http://pub.dartlang.org/packages/meta).
16 /// For examples of using annotations, see 16 /// For examples of using annotations, see
17 /// [Metadata](https://www.dartlang.org/docs/dart-up-and-running/ch02.html#metad ata) 17 /// [Metadata](https://www.dartlang.org/docs/dart-up-and-running/ch02.html#metad ata)
18 /// in the language tour. 18 /// in the language tour.
19 library meta; 19 library meta;
20 20
21 /// Used to annotate an instance method `m` in a class `C`. Indicates that `m` 21 /// Used to annotate an instance member (method, getter, setter, operator, or
22 /// field) `m` in a class `C`. If the annotation is on a field it applies to the
23 /// getter and setter, if appropriate, implied by the field. Indicates that `m`
22 /// should only be invoked from instance methods of `C` or classes that extend 24 /// should only be invoked from instance methods of `C` or classes that extend
23 /// or mix in `C`, either directly or indirectly. Additionally indicates that 25 /// or mix in `C`, either directly or indirectly. Additionally indicates that
24 /// `m` should only be invoked on `this`, whether explicitly or implicitly. 26 /// `m` should only be invoked on `this`, whether explicitly or implicitly.
25 /// 27 ///
26 /// Tools, such as the analyzer, can provide feedback if an invocation of a 28 /// Tools, such as the analyzer, can provide feedback if an invocation of a
27 /// method marked as being protected is used outside of an instance method 29 /// member marked as being protected is used outside of an instance member
28 /// defined on a class that extends or mixes in the class in which the protected 30 /// defined on a class that extends or mixes in the class in which the protected
29 /// method is defined, or that uses a receiver other than `this`. 31 /// member is defined, or that uses a receiver other than `this`.
32 ///
33 /// Tools can also provide feedback if the annotation is used on anything other
34 /// than an instance member.
30 const _Protected protected = const _Protected(); 35 const _Protected protected = const _Protected();
31 36
32 class _Protected { 37 class _Protected {
33 const _Protected(); 38 const _Protected();
34 } 39 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698