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 unstable and its API might change slightly as a |
| 52 * result of user feedback. This library is platform dependent and therefore it |
| 53 * has implementations for both dart2js and the Dart VM. Both are under |
| 54 * development and may not support all operations yet. |
48 */ | 55 */ |
49 library dart.mirrors; | 56 library dart.mirrors; |
50 | 57 |
51 import 'dart:async'; | 58 import 'dart:async'; |
52 import 'dart:isolate'; | 59 import 'dart:isolate'; |
53 | 60 |
54 /** | 61 /** |
55 * A [MirrorSystem] is the main interface used to reflect on a set of | 62 * A [MirrorSystem] is the main interface used to reflect on a set of |
56 * associated libraries. | 63 * associated libraries. |
57 * | 64 * |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 * This map includes all regular methods, getters, setters, fields, classes | 568 * This map includes all regular methods, getters, setters, fields, classes |
562 * and typedefs actually declared in the library. The map is keyed by the | 569 * and typedefs actually declared in the library. The map is keyed by the |
563 * simple names of the declarations. | 570 * simple names of the declarations. |
564 */ | 571 */ |
565 Map<Symbol, DeclarationMirror> get declarations; | 572 Map<Symbol, DeclarationMirror> get declarations; |
566 | 573 |
567 /** | 574 /** |
568 * Returns a map of the top-level methods, getters and setters of the library. | 575 * Returns a map of the top-level methods, getters and setters of the library. |
569 * | 576 * |
570 * The intent is to capture those members that constitute the API of a | 577 * 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 | 578 * library. Hence fields are not included, but the getters and setters |
572 * implicitly introduced by fields are included. Synthetic getters for the | 579 * implicitly introduced by fields are included. Synthetic getters for the |
573 * types exported by the library are also included. | 580 * types exported by the library are also included. |
574 * | 581 * |
575 * The map is keyed by the simple names of the members. | 582 * The map is keyed by the simple names of the members. |
576 */ | 583 */ |
577 Map<Symbol, MethodMirror> get topLevelMembers; | 584 Map<Symbol, MethodMirror> get topLevelMembers; |
578 | 585 |
579 /** | 586 /** |
580 * Returns [:true:] if this mirror is equal to [other]. | 587 * Returns [:true:] if this mirror is equal to [other]. |
581 * Otherwise returns [:false:]. | 588 * Otherwise returns [:false:]. |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 * | 1189 * |
1183 * When used as metadata on an import of "dart:mirrors", this metadata does | 1190 * 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 | 1191 * not apply to the library in which the annotation is used, but instead |
1185 * applies to the other libraries (all libraries if "*" is used). | 1192 * applies to the other libraries (all libraries if "*" is used). |
1186 */ | 1193 */ |
1187 final override; | 1194 final override; |
1188 | 1195 |
1189 const MirrorsUsed( | 1196 const MirrorsUsed( |
1190 {this.symbols, this.targets, this.metaTargets, this.override}); | 1197 {this.symbols, this.targets, this.metaTargets, this.override}); |
1191 } | 1198 } |
OLD | NEW |