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

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

Issue 22849015: Provide a way to get a Type back from a ClassMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix comment Created 7 years, 4 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 b0d39d9c1262150a388d36111a8e4319868b8391..c22d3c3164e8d1bf673cbfbec46c8386c4810492 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -682,6 +682,18 @@ abstract class TypeMirror implements DeclarationMirror {
*/
abstract class ClassMirror implements TypeMirror, ObjectMirror {
/**
+ * Returns true if this mirror reflects a non-generic class or an instantiated
+ * generic class in the current isolate. Otherwise, returns false.
+ */
+ bool get hasReflectedType;
+
+ /**
+ * If [:hasReflectedType:] returns true, returns the corresponding [Type].
+ * Otherwise, an [UnsupportedError] is thrown.
+ */
+ Type get reflectedType;
+
+ /**
* A mirror on the superclass on the reflectee.
*
* If this type is [:Object:] or a typedef, the superClass will be

Powered by Google App Engine
This is Rietveld 408576698