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

Unified Diff: lib/mirrors/mirrors.dart

Issue 10778005: Add a limited version of ParameterMirrors that can only tell whether they are (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 9677)
+++ lib/mirrors/mirrors.dart (working copy)
@@ -355,11 +355,40 @@
* Does this mirror reflect a factory constructor?
*/
bool isFactoryConstructor;
+
+ /**
+ * Returns the list of parameters for this method.
+ */
+ List<ParameterMirror> parameters();
}
+/**
+ * A [ParameterMirror] reflects a Dart formal parameter declaration.
+ */
+interface ParameterMirror extends VariableMirror {
+ /**
+ * Returns the type of this parameter.
+ */
+ TypeMirror type;
+ /**
+ * Returns the default value for this parameter.
+ */
+ String defaultValue;
+
+ /**
+ * Returns true if this parameter has a default value.
+ */
+ bool hasDefaultValue;
+
+ /**
+ * Returns true if this parameter is optional.
+ */
+ bool isOptional;
+}
+
/**
- * A [VariableMirror] reflects a Dart language variable.
+ * A [VariableMirror] reflects a Dart language variable declaration.
*/
interface VariableMirror {
/**
« 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