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

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

Issue 40613003: Hoist generics-related functions from ClassMirror to TypeMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « runtime/lib/mirrors_impl.dart ('k') | no next file » | 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 eddaa77176109e67e567e9d111b55ddd82a0f1f4..455ef59da19b5b75e464d8ec660afcac62d73d03 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -751,6 +751,43 @@ abstract class TypeMirror implements DeclarationMirror {
* This list preserves the order of declaration of the type variables.
*/
List<TypeVariableMirror> get typeVariables;
+
+ /**
+ * An immutable list with mirrors for all type arguments for
+ * this type.
+ *
+ * If the reflectee is an invocation of a generic class,
+ * the type arguments are the bindings of its type parameters.
+ * If the reflectee is the original declaration of a generic,
+ * it has no type arguments and this method returns an empty list.
+ * If the reflectee is not generic, then
+ * it has no type arguments and this method returns an empty list.
+ *
+ * This list preserves the order of declaration of the type variables.
+ */
+ List<TypeMirror> get typeArguments;
+
+ /**
+ * Is this the original declaration of this type?
+ *
+ * For most classes, they are their own original declaration. For
+ * generic classes, however, there is a distinction between the
+ * original class declaration, which has unbound type variables, and
+ * the instantiations of generic classes, which have bound type
+ * variables.
+ */
+ bool get isOriginalDeclaration;
+
+ /**
+ * A mirror on the original declaration of this type.
+ *
+ * For most classes, they are their own original declaration. For
+ * generic classes, however, there is a distinction between the
+ * original class declaration, which has unbound type variables, and
+ * the instantiations of generic classes, which have bound type
+ * variables.
+ */
+ TypeMirror get originalDeclaration;
}
/**
@@ -832,43 +869,6 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
*/
Map<Symbol, MethodMirror> get constructors;
- /**
- * An immutable list with mirrors for all type arguments for
- * this type.
- *
- * If the reflectee is an invocation of a generic class,
- * the type arguments are the bindings of its type parameters.
- * If the reflectee is the original declaration of a generic,
- * it has no type arguments and this method returns an empty list.
- * If the reflectee is not generic, then
- * it has no type arguments and this method returns an empty list.
- *
- * This list preserves the order of declaration of the type variables.
- */
- List<TypeMirror> get typeArguments;
-
- /**
- * Is this the original declaration of this type?
- *
- * For most classes, they are their own original declaration. For
- * generic classes, however, there is a distinction between the
- * original class declaration, which has unbound type variables, and
- * the instantiations of generic classes, which have bound type
- * variables.
- */
- bool get isOriginalDeclaration;
-
- /**
- * A mirror on the original declaration of this type.
- *
- * For most classes, they are their own original declaration. For
- * generic classes, however, there is a distinction between the
- * original class declaration, which has unbound type variables, and
- * the instantiations of generic classes, which have bound type
- * variables.
- */
- ClassMirror get originalDeclaration;
-
/**
* Invokes the named constructor and returns a mirror on the result.
*
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698