Chromium Code Reviews| Index: sdk/lib/mirrors/mirrors.dart |
| diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart |
| index 0b9ebe52901ad6e493209ce56976a73721e9e9c7..7070fd480ebf57c75fe7a0a91f205493f2087ab0 100644 |
| --- a/sdk/lib/mirrors/mirrors.dart |
| +++ b/sdk/lib/mirrors/mirrors.dart |
| @@ -547,6 +547,29 @@ abstract class InstanceMirror implements ObjectMirror { |
| * invocation.namedArguments); |
| */ |
| delegate(Invocation invocation); |
| + |
| + /** |
| + * Returns a closure for invoking the regular method named [name]. |
| + * |
| + * If [:type.instanceLookup(name):] returns a regular method, the result of |
| + * this method is a closure equivalent to: |
| + * |
| + * (r1, .., rn, {p1: d1, ..., pk: dk}) { |
| + * return this.invoke(name, [r1, .., rn], {#p1: p1, .., #pk: pk}); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and named parameters p1, ..., pk |
| + * with defaults d1, ..., dk. |
| + * |
| + * (r1, .., rn, [p1 = d1, …, pk = dk]) { |
| + * return this.invoke(name, [r1, .., rn, p1, .., pk]); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and optional positional |
| + * parameters p1, ..., pk with defaults d1, ..., dk. |
| + */ |
|
gbracha
2013/10/03 00:58:54
See proposed modification to wording below. Appli
rmacnak
2013/10/03 16:58:07
Done.
|
| + Function operator [](Symbol name); |
| + |
| } |
| /** |
| @@ -692,6 +715,26 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { |
| * the same library in the same isolate. |
| */ |
| bool operator == (other); |
| + |
| + /** |
| + * If [:declarations[name]:] is a regular method, the result of this method |
| + * is a closure equivalent to: |
| + * |
| + * (r1, .., rn, {p1: d1, ..., pk: dk}) { |
| + * return this.invoke(name, [r1, .., rn], {#p1: p1, .., #pk: pk}); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and named parameters p1, ..., pk |
| + * with defaults d1, ..., dk. |
| + * |
| + * (r1, .., rn, [p1 = d1, …, pk = dk]) { |
| + * return this.invoke(name, [r1, .., rn, p1, .., pk]); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and optional positional |
| + * parameters p1, ..., pk with defaults d1, ..., dk. |
| + */ |
| + Function operator [](Symbol name); |
| } |
| /** |
| @@ -905,6 +948,26 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror { |
| * and [other] have equal type arguments. |
| */ |
| bool operator == (other); |
| + |
| + /** |
| + * If [:declarations[name]:] is a regular method, the result of this method |
| + * is a closure equivalent to: |
| + * |
| + * (r1, .., rn, {p1: d1, ..., pk: dk}) { |
| + * return this.invoke(name, [r1, .., rn], {#p1: p1, .., #pk: pk}); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and named parameters p1, ..., pk |
| + * with defaults d1, ..., dk. |
|
gbracha
2013/10/03 00:58:54
Otherwise, the result of this method is a closure
|
| + * |
| + * (r1, .., rn, [p1 = d1, …, pk = dk]) { |
| + * return this.invoke(name, [r1, .., rn, p1, .., pk]); |
| + * } |
| + * |
| + * if m has required parameters r1, ..., rn, and optional positional |
| + * parameters p1, ..., pk with defaults d1, ..., dk. |
| + */ |
| + Function operator [](Symbol name); |
| } |
| /** |