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

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

Issue 189843003: Reapply "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/compiler/dart2js/dart2js.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 0c2993124c743f8291a3fa864f857017f559f441..97c6d21ce7515f561e6a6f22cbcbf6c9a0576969 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -607,6 +607,51 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror {
* [ArgumentError] is thrown.
*/
Function operator [](Symbol name);
+
+ /**
+ * Returns a list of the imports and exports in this library;
+ */
+ List<LibraryDependencyMirror> get libraryDependencies;
+}
+
+/// A mirror on an import or export declaration.
+abstract class LibraryDependencyMirror {
+ /// Is `true` if this dependency is an import.
+ bool get isImport;
+
+ /// Is `true` if this dependency is an export.
+ bool get isExport;
+
+ /// Returns the library mirror of the library that imports or exports the
+ /// [targetLibrary].
+ LibraryMirror get sourceLibrary;
+
+ /// Returns the library mirror of the library that is imported or exported.
+ LibraryMirror get targetLibrary;
+
+ /// Returns the prefix if this is a prefixed import and `null` otherwise.
+ Symbol get prefix;
+
+ /// Returns the list of show/hide combinators on the import/export
+ /// declaration.
+ List<CombinatorMirror> get combinators;
+
+ /// Returns the source location for this import/export declaration.
+ SourceLocation get location;
+
+ List<InstanceMirror> get metadata;
+}
+
+/// A mirror on a show/hide combinator declared on a library dependency.
+abstract class CombinatorMirror {
+ /// The list of identifiers on the combinator.
+ List<Symbol> get identifiers;
+
+ /// Is `true` if this is a 'show' combinator.
+ bool get isShow;
+
+ /// Is `true` if this is a 'hide' combinator.
+ bool get isHide;
}
/**
« no previous file with comments | « sdk/lib/_internal/lib/js_mirrors.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698