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

Unified Diff: lib/src/initializer.dart

Issue 880713002: add LibraryIdentifier (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: code review updates Created 5 years, 11 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 | « lib/src/initialize_tracker.dart ('k') | lib/src/mirror_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/initializer.dart
diff --git a/lib/src/initializer.dart b/lib/src/initializer.dart
index 3ddf0cced6a096aa7f56344084a1b042b88542ec..60a04d51dbdadedbaccd6e1d93cec7a06142d03b 100644
--- a/lib/src/initializer.dart
+++ b/lib/src/initializer.dart
@@ -26,3 +26,23 @@ abstract class Initializer<T> {
/// Typedef for a custom filter function.
typedef bool InitializerFilter(Initializer initializer);
+
+/// When annotating libraries, this is passed to the initializer.
+class LibraryIdentifier {
+ // The qualified name of the library.
+ final Symbol name;
+
+ // The package this library lives in. May be null if its the same as the root
+ // package.
+ final String package;
+
+ // The path to the library.
+ final String path;
+
+ const LibraryIdentifier(this.name, this.package, this.path);
+
+ bool operator ==(LibraryIdentifier other) =>
+ name == other.name && package == other.package && path == other.path;
+
+ String toString() => '$name: $package:$path';
+}
« no previous file with comments | « lib/src/initialize_tracker.dart ('k') | lib/src/mirror_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698