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

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

Issue 1144923012: Fix dartdoc for InstanceMirror.delegate and ClosureMirror. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | 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 5d736417011b437452633ccb8771e821d9a8459a..020e7315a7877bd74dc897c57c245a7a76fa00e3 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -14,13 +14,13 @@
/**
* Basic reflection in Dart,
- * with support for introspection and dynamic evaluation.
+ * with support for introspection and dynamic invocation.
*
* *Introspection* is that subset of reflection by which a running
* program can examine its own structure. For example, a function
* that prints out the names of all the members of an arbitrary object.
*
- * *Dynamic evaluation* refers the ability to evaluate code that
+ * *Dynamic invocation* refers the ability to evaluate code that
* has not been literally specified at compile time, such as calling a method
* whose name is provided as an argument (because it is looked up
* in a database, or provided interactively by the user).
@@ -504,9 +504,16 @@ abstract class InstanceMirror implements ObjectMirror {
* Perform [invocation] on [reflectee].
* Equivalent to
*
- * this.invoke(invocation.memberName,
- * invocation.positionalArguments,
- * invocation.namedArguments);
+ * if (invocation.isGetter) {
+ * return this.getField(invocation.memberName).reflectee;
+ * } else if (invocation.isSetter) {
+ * return this.setField(invocation.memberName,
+ * invocation.positionArguments[0]).reflectee;
+ * } else {
+ * return this.invoke(invocation.memberName,
+ * invocation.positionalArguments,
+ * invocation.namedArguments).reflectee;
+ * }
*/
delegate(Invocation invocation);
}
@@ -514,8 +521,8 @@ abstract class InstanceMirror implements ObjectMirror {
/**
* A [ClosureMirror] reflects a closure.
*
- * A [ClosureMirror] provides access to its captured variables and
- * provides the ability to execute its reflectee.
+ * A [ClosureMirror] provides the ability to execute its reflectee and
+ * introspect its function.
gbracha 2015/06/09 00:27:41 Sigh. What is the point of a closure mirror? We ca
rmacnak 2015/06/09 00:40:10 closureMirror.function isn't the same as closureMi
*/
abstract class ClosureMirror implements InstanceMirror {
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698