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

Unified Diff: sdk/lib/mirrors/mirrors.dart

Issue 36023003: Add LibraryMirror.declarations and ClassMirror.declarations to the API and both implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: typevars are not static 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 eddaa77176109e67e567e9d111b55ddd82a0f1f4..8fbc2b1bac07e4317e58ce0bf5c2d28a247f2c20 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -676,6 +676,15 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror {
Uri get uri;
/**
+ * Returns an immutable map of the declarations actually given in the library.
+ *
+ * This map includes all regular methods, getters, setters, fields, classes
+ * and typedefs actually declared in the library. The map is keyed by the
+ * simple names of the declarations.
+ */
+ Map<Symbol, DeclarationMirror> get declarations;
+
+ /**
* An immutable map from from names to mirrors for all members in
* this library.
*
@@ -732,7 +741,7 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror {
* are
* the same library in the same isolate.
*/
- bool operator == (other);
+ bool operator ==(other);
}
/**
@@ -781,6 +790,17 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
*/
List<ClassMirror> get superinterfaces;
+ /**
+ * Returns an immutable map of the declarations actually given in the class
+ * declaration.
+ *
+ * This map includes all regular methods, getters, setters, fields,
+ * constructors and type variables actually declared in the class. Both
+ * static and instance members are included, but no inherited members are
+ * included. The map is keyed by the simple names of the declarations.
+ */
+ Map<Symbol, DeclarationMirror> get declarations;
+
/**
* The mixin of this class.
* If this class is the result of a mixin application of the

Powered by Google App Engine
This is Rietveld 408576698