Chromium Code Reviews| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 * access to the variables, functions, and classes of the | 669 * access to the variables, functions, and classes of the |
| 670 * library. | 670 * library. |
| 671 */ | 671 */ |
| 672 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { | 672 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { |
| 673 /** | 673 /** |
| 674 * The absolute uri of the library. | 674 * The absolute uri of the library. |
| 675 */ | 675 */ |
| 676 Uri get uri; | 676 Uri get uri; |
| 677 | 677 |
| 678 /** | 678 /** |
| 679 * Returns an immutable map of the declarations actually given in the library. | |
| 680 * | |
| 681 * This map includes all regular methods, getters, setters, fields, classes | |
| 682 * and typedefs actually declared in the library. The map is keyed by the | |
| 683 * simple names of the declarations. | |
| 684 */ | |
| 685 Map<Symbol, DeclarationMirror> get declarations; | |
| 686 | |
| 687 /** | |
| 679 * An immutable map from from names to mirrors for all members in | 688 * An immutable map from from names to mirrors for all members in |
| 680 * this library. | 689 * this library. |
| 681 * | 690 * |
| 682 * The members of a library are its top-level classes, | 691 * The members of a library are its top-level classes, |
| 683 * functions, variables, getters, and setters. | 692 * functions, variables, getters, and setters. |
| 684 */ | 693 */ |
| 685 Map<Symbol, Mirror> get members; | 694 Map<Symbol, Mirror> get members; |
| 686 | 695 |
| 687 /** | 696 /** |
| 688 * An immutable map from names to mirrors for all class | 697 * An immutable map from names to mirrors for all class |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 725 * Otherwise returns [:false:]. | 734 * Otherwise returns [:false:]. |
| 726 * | 735 * |
| 727 * The equality holds if and only if | 736 * The equality holds if and only if |
| 728 * (1) [other] is a mirror of the same kind | 737 * (1) [other] is a mirror of the same kind |
| 729 * and | 738 * and |
| 730 * (2) The library being reflected by this mirror | 739 * (2) The library being reflected by this mirror |
| 731 * and the library being reflected by [other] | 740 * and the library being reflected by [other] |
| 732 * are | 741 * are |
| 733 * the same library in the same isolate. | 742 * the same library in the same isolate. |
| 734 */ | 743 */ |
| 735 bool operator == (other); | 744 bool operator ==(other); |
| 736 } | 745 } |
| 737 | 746 |
| 738 /** | 747 /** |
| 739 * A [TypeMirror] reflects a Dart language class, typedef, | 748 * A [TypeMirror] reflects a Dart language class, typedef, |
| 740 * function type or type variable. | 749 * function type or type variable. |
| 741 */ | 750 */ |
| 742 abstract class TypeMirror implements DeclarationMirror { | 751 abstract class TypeMirror implements DeclarationMirror { |
| 743 /** | 752 /** |
| 744 * An immutable list with mirrors for all type variables for this type. | 753 * An immutable list with mirrors for all type variables for this type. |
| 745 * | 754 * |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 774 * | 783 * |
| 775 * If this type is [:Object:], the superclass will be null. | 784 * If this type is [:Object:], the superclass will be null. |
| 776 */ | 785 */ |
| 777 ClassMirror get superclass; | 786 ClassMirror get superclass; |
| 778 | 787 |
| 779 /** | 788 /** |
| 780 * A list of mirrors on the superinterfaces of the reflectee. | 789 * A list of mirrors on the superinterfaces of the reflectee. |
| 781 */ | 790 */ |
| 782 List<ClassMirror> get superinterfaces; | 791 List<ClassMirror> get superinterfaces; |
| 783 | 792 |
| 793 /** | |
| 794 * Returns an immutable map of the declarations actually given in the class | |
| 795 * declaration. | |
| 796 * | |
| 797 * This map includes all regular methods, getters, setters, fields, | |
| 798 * constructors and type variables actually declared in the class. Both | |
| 799 * static and instance members are included, but no inherited members are | |
| 800 * included. The map is keyed by the simple names of the declarations. | |
| 801 */ | |
| 802 Map<Symbol, DeclarationMirror> get declarations; | |
|
gbracha
2013/10/22 22:26:50
So, we are providing typeVariables as an accessor
| |
| 803 | |
| 784 /** | 804 /** |
| 785 * The mixin of this class. | 805 * The mixin of this class. |
| 786 * If this class is the result of a mixin application of the | 806 * If this class is the result of a mixin application of the |
| 787 * form S with M, returns a class mirror on M. | 807 * form S with M, returns a class mirror on M. |
| 788 * Otherwise returns a class mirror on [reflectee]. | 808 * Otherwise returns a class mirror on [reflectee]. |
| 789 */ | 809 */ |
| 790 ClassMirror get mixin; | 810 ClassMirror get mixin; |
| 791 | 811 |
| 792 /** | 812 /** |
| 793 * An immutable map from names to mirrors for all members of | 813 * An immutable map from names to mirrors for all members of |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1402 * | 1422 * |
| 1403 * When used as metadata on an import of "dart:mirrors", this metadata does | 1423 * When used as metadata on an import of "dart:mirrors", this metadata does |
| 1404 * not apply to the library in which the annotation is used, but instead | 1424 * not apply to the library in which the annotation is used, but instead |
| 1405 * applies to the other libraries (all libraries if "*" is used). | 1425 * applies to the other libraries (all libraries if "*" is used). |
| 1406 */ | 1426 */ |
| 1407 final override; | 1427 final override; |
| 1408 | 1428 |
| 1409 const MirrorsUsed( | 1429 const MirrorsUsed( |
| 1410 {this.symbols, this.targets, this.metaTargets, this.override}); | 1430 {this.symbols, this.targets, this.metaTargets, this.override}); |
| 1411 } | 1431 } |
| OLD | NEW |