OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // For the purposes of the mirrors library, we adopt a naming | 5 // For the purposes of the mirrors library, we adopt a naming |
6 // convention with respect to getters and setters. Specifically, for | 6 // convention with respect to getters and setters. Specifically, for |
7 // some variable or field... | 7 // some variable or field... |
8 // | 8 // |
9 // var myField; | 9 // var myField; |
10 // | 10 // |
11 // ...the getter is named 'myField' and the setter is named | 11 // ...the getter is named 'myField' and the setter is named |
(...skipping 26 matching lines...) Expand all Loading... | |
38 * cases is [:o'.x(a'):] where *o'* and *a'* are Dart variables | 38 * cases is [:o'.x(a'):] where *o'* and *a'* are Dart variables |
39 * bound to *o* and *a* respectively. Furthermore, *o'* and *a'* | 39 * bound to *o* and *a* respectively. Furthermore, *o'* and *a'* |
40 * are assumed to be fresh variables (meaning that they are | 40 * are assumed to be fresh variables (meaning that they are |
41 * distinct from any other variables in the program). | 41 * distinct from any other variables in the program). |
42 * | 42 * |
43 * Sometimes the documentation refers to *serializable* objects. | 43 * Sometimes the documentation refers to *serializable* objects. |
44 * An object is serializable across isolates if and only if it is an instance of | 44 * An object is serializable across isolates if and only if it is an instance of |
45 * num, bool, String, a list of objects that are serializable | 45 * num, bool, String, a list of objects that are serializable |
46 * across isolates, or a map with keys and values that are all serializable acro ss | 46 * across isolates, or a map with keys and values that are all serializable acro ss |
47 * isolates. | 47 * isolates. |
48 * | |
49 * ## Status: Unstable | |
50 * | |
51 * The dart:mirrors library is considered unstable and its API might | |
52 * change slightly as a result of feedback from users. There are two | |
53 * implementations of the library -- one for the native Dart VM and one | |
54 * for dart2js -- and they are both under development and may not | |
55 * support all operations yet. | |
bakster
2013/11/08 10:32:33
- Remove "considered".
- use "user feedback".
- Th
| |
48 */ | 56 */ |
49 library dart.mirrors; | 57 library dart.mirrors; |
50 | 58 |
51 import 'dart:async'; | 59 import 'dart:async'; |
52 import 'dart:isolate'; | 60 import 'dart:isolate'; |
53 | 61 |
54 /** | 62 /** |
55 * A [MirrorSystem] is the main interface used to reflect on a set of | 63 * A [MirrorSystem] is the main interface used to reflect on a set of |
56 * associated libraries. | 64 * associated libraries. |
57 * | 65 * |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 * This map includes all regular methods, getters, setters, fields, classes | 569 * This map includes all regular methods, getters, setters, fields, classes |
562 * and typedefs actually declared in the library. The map is keyed by the | 570 * and typedefs actually declared in the library. The map is keyed by the |
563 * simple names of the declarations. | 571 * simple names of the declarations. |
564 */ | 572 */ |
565 Map<Symbol, DeclarationMirror> get declarations; | 573 Map<Symbol, DeclarationMirror> get declarations; |
566 | 574 |
567 /** | 575 /** |
568 * Returns a map of the top-level methods, getters and setters of the library. | 576 * Returns a map of the top-level methods, getters and setters of the library. |
569 * | 577 * |
570 * The intent is to capture those members that constitute the API of a | 578 * The intent is to capture those members that constitute the API of a |
571 * library. Hence fields are not included, but the getters and setters | 579 * library. Hence fields are not included, but the getters and setters |
572 * implicitly introduced by fields are included. Synthetic getters for the | 580 * implicitly introduced by fields are included. Synthetic getters for the |
573 * types exported by the library are also included. | 581 * types exported by the library are also included. |
574 * | 582 * |
575 * The map is keyed by the simple names of the members. | 583 * The map is keyed by the simple names of the members. |
576 */ | 584 */ |
577 Map<Symbol, MethodMirror> get topLevelMembers; | 585 Map<Symbol, MethodMirror> get topLevelMembers; |
578 | 586 |
579 /** | 587 /** |
580 * Returns [:true:] if this mirror is equal to [other]. | 588 * Returns [:true:] if this mirror is equal to [other]. |
581 * Otherwise returns [:false:]. | 589 * Otherwise returns [:false:]. |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1182 * | 1190 * |
1183 * When used as metadata on an import of "dart:mirrors", this metadata does | 1191 * When used as metadata on an import of "dart:mirrors", this metadata does |
1184 * not apply to the library in which the annotation is used, but instead | 1192 * not apply to the library in which the annotation is used, but instead |
1185 * applies to the other libraries (all libraries if "*" is used). | 1193 * applies to the other libraries (all libraries if "*" is used). |
1186 */ | 1194 */ |
1187 final override; | 1195 final override; |
1188 | 1196 |
1189 const MirrorsUsed( | 1197 const MirrorsUsed( |
1190 {this.symbols, this.targets, this.metaTargets, this.override}); | 1198 {this.symbols, this.targets, this.metaTargets, this.override}); |
1191 } | 1199 } |
OLD | NEW |