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

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: rebase 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
« no previous file with comments | « sdk/lib/_internal/lib/js_mirrors.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 455ef59da19b5b75e464d8ec660afcac62d73d03..109f83226d7cf16e0c7527c11b8288d4fc2797f6 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);
}
/**
@@ -818,6 +827,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
« no previous file with comments | « sdk/lib/_internal/lib/js_mirrors.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698