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

Unified Diff: lib/mirrors/mirrors.dart

Issue 10916252: Implement more of the mirrors library, primarily stuff to do with types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | runtime/include/dart_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/mirrors/mirrors.dart
===================================================================
--- lib/mirrors/mirrors.dart (revision 11702)
+++ lib/mirrors/mirrors.dart (working copy)
@@ -362,8 +362,9 @@
* An immutable map from from names to mirrors for all members of
* this type.
*
- * The members of an interface are its constructors, methods,
- * fields, getters, and setters.
+ * The members of a type are its methods, fields, getters, and
+ * setters. Note that constructors and type variables are not
+ * considered to be members of a type.
*
* This does not include inherited members.
*/
@@ -371,17 +372,12 @@
/**
* An immutable map from names to mirrors for all method,
- * constructor, getter, and setter declarations for this type.
+ * declarations for this type. This does not include getters and
+ * setters.
*/
final Map<String, MethodMirror> methods;
/**
- * An immutable map from names to mirrors for all constructor
- * declarations for this type.
- */
- final Map<String, MethodMirror> constructors;
-
- /**
* An immutable map from names to mirrors for all getter
* declarations for this type.
*/
@@ -400,16 +396,28 @@
final Map<String, VariableMirror> variables;
/**
- * A list of type variables for this type.
+ * An immutable map from names to mirrors for all constructor
+ * declarations for this type.
*/
- final List<TypeVariableMirror> typeVariables;
+ final Map<String, MethodMirror> constructors;
/**
- * A list of the type arguments for this type.
+ * An immutable map from names to mirrors for all type variables for
+ * this type.
+ *
+ * This map preserves the order of declaration of the type variables.
*/
- final List<TypeMirror> typeArguments;
+ final Map<String, TypeVariableMirror> typeVariables;
/**
+ * An immutable map from names to mirrors for all type arguments for
+ * this type.
+ *
+ * This map preserves the order of declaration of the type variables.
+ */
+ final Map<String, TypeMirror> typeArguments;
+
+ /**
* Is this the original declaration of this type?
*
* For most classes, they are their own original declaration. For
@@ -458,21 +466,10 @@
}
/**
- * A [TypeVariableMirror] represents a type parameter of a generic
- * type.
- */
-interface TypeVariableMirror extends TypeMirror {
- /**
- * A mirror on the type that is the upper bound for this type variable.
- */
- final TypeMirror upperBound;
-}
-
-/**
* A [FunctionTypeMirror] represents the type of a function in the
* Dart language.
*/
-interface FunctionTypeMirror extends TypeMirror {
+interface FunctionTypeMirror extends ClassMirror {
/**
* The return type of the reflectee.
*/
@@ -492,15 +489,26 @@
}
/**
+ * A [TypeVariableMirror] represents a type parameter of a generic
+ * type.
+ */
+interface TypeVariableMirror extends TypeMirror {
+ /**
+ * A mirror on the type that is the upper bound of this type variable.
+ */
+ final TypeMirror upperBound;
+}
+
+/**
* A [TypedefMirror] represents a typedef in a Dart language program.
*/
-interface TypedefMirror extends ClassMirror {
+interface TypedefMirror extends TypeMirror {
/**
* The defining type for this typedef.
*
* For instance [:void f(int):] is the value for [:typedef void f(int):].
*/
- final TypeMirror value;
+ final TypeMirror referent;
}
/**
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698