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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 109f83226d7cf16e0c7527c11b8288d4fc2797f6..4349675ea5434e9f592018e39435ed6e927c9ae8 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -684,6 +684,8 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror {
*/
Map<Symbol, DeclarationMirror> get declarations;
+ Map<Symbol, MethodMirror> get toplevelMembers;
gbracha 2013/10/26 18:37:48 So is the agreed name for api? It's not great, but
+
/**
* An immutable map from from names to mirrors for all members in
* this library.
@@ -839,6 +841,23 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
Map<Symbol, DeclarationMirror> get declarations;
/**
+ * Returns a map of the methods, getters and setters of an
+ * instance of the class.
+ * The intent is to capture those members that can are
+ * part of the API of an instance. Hence fields are not
+ * included. Getters that are implicitly introduced
+ * by fields are included. Setters that are implicitly introduced
+ * 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
+ * The map includes methods, getters and setters that
+ * are inherited as well as those introduced by the class itself.
+ * The map is keyed by the simple names of the members.
+ */
+ Map<Symbol, MethodMirror> get instanceMembers;
+
+ Map<Symbol, MethodMirror> get staticMembers;
gbracha 2013/10/26 18:37:48 Add analogous spec for static members.
+
ahe 2013/10/29 10:14:38 Extra line.
+
+ /**
* The mixin of this class.
* If this class is the result of a mixin application of the
* form S with M, returns a class mirror on M.

Powered by Google App Engine
This is Rietveld 408576698