OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 /** | 571 /** |
572 * Returns an immutable map of the declarations actually given in the library. | 572 * Returns an immutable map of the declarations actually given in the library. |
573 * | 573 * |
574 * This map includes all regular methods, getters, setters, fields, classes | 574 * This map includes all regular methods, getters, setters, fields, classes |
575 * and typedefs actually declared in the library. The map is keyed by the | 575 * and typedefs actually declared in the library. The map is keyed by the |
576 * simple names of the declarations. | 576 * simple names of the declarations. |
577 */ | 577 */ |
578 Map<Symbol, DeclarationMirror> get declarations; | 578 Map<Symbol, DeclarationMirror> get declarations; |
579 | 579 |
580 /** | 580 /** |
| 581 * Returns a map of the top-level methods, getters and setters of the library. |
| 582 * |
| 583 * The intent is to capture those members that constitute the API of a |
| 584 * library. Hence fields are not included, but the getters and setters |
| 585 * implicitly introduced by fields are included. Synthetic getters for the |
| 586 * types exported by the library are also included. |
| 587 * |
| 588 * The map is keyed by the simple names of the members. |
| 589 */ |
| 590 Map<Symbol, MethodMirror> get topLevelMembers; |
| 591 |
| 592 /** |
581 * Returns [:true:] if this mirror is equal to [other]. | 593 * Returns [:true:] if this mirror is equal to [other]. |
582 * Otherwise returns [:false:]. | 594 * Otherwise returns [:false:]. |
583 * | 595 * |
584 * The equality holds if and only if | 596 * The equality holds if and only if |
585 * (1) [other] is a mirror of the same kind | 597 * (1) [other] is a mirror of the same kind |
586 * and | 598 * and |
587 * (2) The library being reflected by this mirror | 599 * (2) The library being reflected by this mirror |
588 * and the library being reflected by [other] | 600 * and the library being reflected by [other] |
589 * are | 601 * are |
590 * the same library in the same isolate. | 602 * the same library in the same isolate. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 * This map includes all regular methods, getters, setters, fields, | 716 * This map includes all regular methods, getters, setters, fields, |
705 * constructors and type variables actually declared in the class. Both | 717 * constructors and type variables actually declared in the class. Both |
706 * static and instance members are included, but no inherited members are | 718 * static and instance members are included, but no inherited members are |
707 * included. The map is keyed by the simple names of the declarations. | 719 * included. The map is keyed by the simple names of the declarations. |
708 * | 720 * |
709 * This does not include inherited members. | 721 * This does not include inherited members. |
710 */ | 722 */ |
711 Map<Symbol, DeclarationMirror> get declarations; | 723 Map<Symbol, DeclarationMirror> get declarations; |
712 | 724 |
713 /** | 725 /** |
| 726 * Returns a map of the methods, getters and setters of an instance of the |
| 727 * class. |
| 728 * |
| 729 * The intent is to capture those members that constitute the API of an |
| 730 * instance. Hence fields are not included, but the getters and setters |
| 731 * implicitly introduced by fields are included. The map includes methods, |
| 732 * getters and setters that are inherited as well as those introduced by the |
| 733 * class itself. |
| 734 * |
| 735 * The map is keyed by the simple names of the members. |
| 736 */ |
| 737 Map<Symbol, MethodMirror> get instanceMembers; |
| 738 |
| 739 /** |
| 740 * Returns a map of the static methods, getters and setters of the class. |
| 741 * |
| 742 * The intent is to capture those members that constitute the API of a class. |
| 743 * Hence fields are not included, but the getters and setters implicitly |
| 744 * introduced by fields are included. |
| 745 * |
| 746 * The map is keyed by the simple names of the members. |
| 747 */ |
| 748 Map<Symbol, MethodMirror> get staticMembers; |
| 749 |
| 750 |
| 751 /** |
714 * The mixin of this class. | 752 * The mixin of this class. |
715 * If this class is the result of a mixin application of the | 753 * If this class is the result of a mixin application of the |
716 * form S with M, returns a class mirror on M. | 754 * form S with M, returns a class mirror on M. |
717 * Otherwise returns a class mirror on [reflectee]. | 755 * Otherwise returns a class mirror on [reflectee]. |
718 */ | 756 */ |
719 ClassMirror get mixin; | 757 ClassMirror get mixin; |
720 | 758 |
721 // TODO(ahe): What about: | 759 // TODO(ahe): What about: |
722 // /// Finds the instance member named [name] declared or inherited in the | 760 // /// Finds the instance member named [name] declared or inherited in the |
723 // /// reflected class. | 761 // /// reflected class. |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 * | 1195 * |
1158 * When used as metadata on an import of "dart:mirrors", this metadata does | 1196 * When used as metadata on an import of "dart:mirrors", this metadata does |
1159 * not apply to the library in which the annotation is used, but instead | 1197 * not apply to the library in which the annotation is used, but instead |
1160 * applies to the other libraries (all libraries if "*" is used). | 1198 * applies to the other libraries (all libraries if "*" is used). |
1161 */ | 1199 */ |
1162 final override; | 1200 final override; |
1163 | 1201 |
1164 const MirrorsUsed( | 1202 const MirrorsUsed( |
1165 {this.symbols, this.targets, this.metaTargets, this.override}); | 1203 {this.symbols, this.targets, this.metaTargets, this.override}); |
1166 } | 1204 } |
OLD | NEW |