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

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: forgot to version the new test... 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
« no previous file with comments | « runtime/lib/mirrors_impl.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 b0d39d9c1262150a388d36111a8e4319868b8391..7ea9f0843f38351e80453898fe2882bc7c33b959 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 instanitated
+ * generic class. Otherwise, returns false.
+ */
gbracha 2013/08/16 19:59:31 This will also have to account for remote mirrors
rmacnak 2013/08/16 20:06:29 Done.
+ 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
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698