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

Side by Side Diff: sdk/lib/mirrors/mirrors.dart

Issue 44813004: Tests for instanceMembers, staticMembers, toplevelMembers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 677
678 /** 678 /**
679 * Returns an immutable map of the declarations actually given in the library. 679 * Returns an immutable map of the declarations actually given in the library.
680 * 680 *
681 * This map includes all regular methods, getters, setters, fields, classes 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 682 * and typedefs actually declared in the library. The map is keyed by the
683 * simple names of the declarations. 683 * simple names of the declarations.
684 */ 684 */
685 Map<Symbol, DeclarationMirror> get declarations; 685 Map<Symbol, DeclarationMirror> get declarations;
686 686
687 Map<Symbol, MethodMirror> get toplevelMembers;
gbracha 2013/10/26 18:37:48 So is the agreed name for api? It's not great, but
688
687 /** 689 /**
688 * An immutable map from from names to mirrors for all members in 690 * An immutable map from from names to mirrors for all members in
689 * this library. 691 * this library.
690 * 692 *
691 * The members of a library are its top-level classes, 693 * The members of a library are its top-level classes,
692 * functions, variables, getters, and setters. 694 * functions, variables, getters, and setters.
693 */ 695 */
694 Map<Symbol, Mirror> get members; 696 Map<Symbol, Mirror> get members;
695 697
696 /** 698 /**
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 * declaration. 834 * declaration.
833 * 835 *
834 * This map includes all regular methods, getters, setters, fields, 836 * This map includes all regular methods, getters, setters, fields,
835 * constructors and type variables actually declared in the class. Both 837 * constructors and type variables actually declared in the class. Both
836 * static and instance members are included, but no inherited members are 838 * static and instance members are included, but no inherited members are
837 * included. The map is keyed by the simple names of the declarations. 839 * included. The map is keyed by the simple names of the declarations.
838 */ 840 */
839 Map<Symbol, DeclarationMirror> get declarations; 841 Map<Symbol, DeclarationMirror> get declarations;
840 842
841 /** 843 /**
844 * Returns a map of the methods, getters and setters of an
845 * instance of the class.
846 * The intent is to capture those members that can are
847 * part of the API of an instance. Hence fields are not
848 * included. Getters that are implicitly introduced
849 * by fields are included. Setters that are implicitly introduced
850 * by fields are included iff the field is non-final.
gbracha 2013/10/26 18:37:48 Since finals no longer imply a setter, we can drop
851 * The map includes methods, getters and setters that
852 * are inherited as well as those introduced by the class itself.
853 * The map is keyed by the simple names of the members.
854 */
855 Map<Symbol, MethodMirror> get instanceMembers;
856
857 Map<Symbol, MethodMirror> get staticMembers;
gbracha 2013/10/26 18:37:48 Add analogous spec for static members.
858
ahe 2013/10/29 10:14:38 Extra line.
859
860 /**
842 * The mixin of this class. 861 * The mixin of this class.
843 * If this class is the result of a mixin application of the 862 * If this class is the result of a mixin application of the
844 * form S with M, returns a class mirror on M. 863 * form S with M, returns a class mirror on M.
845 * Otherwise returns a class mirror on [reflectee]. 864 * Otherwise returns a class mirror on [reflectee].
846 */ 865 */
847 ClassMirror get mixin; 866 ClassMirror get mixin;
848 867
849 /** 868 /**
850 * An immutable map from names to mirrors for all members of 869 * An immutable map from names to mirrors for all members of
851 * this type. 870 * this type.
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 * 1441 *
1423 * When used as metadata on an import of "dart:mirrors", this metadata does 1442 * When used as metadata on an import of "dart:mirrors", this metadata does
1424 * not apply to the library in which the annotation is used, but instead 1443 * not apply to the library in which the annotation is used, but instead
1425 * applies to the other libraries (all libraries if "*" is used). 1444 * applies to the other libraries (all libraries if "*" is used).
1426 */ 1445 */
1427 final override; 1446 final override;
1428 1447
1429 const MirrorsUsed( 1448 const MirrorsUsed(
1430 {this.symbols, this.targets, this.metaTargets, this.override}); 1449 {this.symbols, this.targets, this.metaTargets, this.override});
1431 } 1450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698