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

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') | runtime/include/dart_api.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/mirrors/mirrors.dart
===================================================================
--- lib/mirrors/mirrors.dart (revision 9646)
+++ lib/mirrors/mirrors.dart (working copy)
@@ -355,9 +355,38 @@
* Does this mirror reflect a factory constructor?
*/
bool isFactoryConstructor;
+
+ /**
+ * Returns the list of parameters for this method.
+ */
+ List<ParameterMirror> parameters();
}
+/**
+ * A formal parameter.
turnidge 2012/07/13 23:37:12 Make this comment look more like others in the fil
+ */
+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.
*/
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698