OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // For the purposes of the mirrors library, we adopt a naming | 5 // For the purposes of the mirrors library, we adopt a naming |
6 // convention with respect to getters and setters. Specifically, for | 6 // convention with respect to getters and setters. Specifically, for |
7 // some variable or field... | 7 // some variable or field... |
8 // | 8 // |
9 // var myField; | 9 // var myField; |
10 // | 10 // |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 * Let *f* be the closure reflected by this mirror, | 531 * Let *f* be the closure reflected by this mirror, |
532 * let *a1, ..., an* be the elements of [positionalArguments] | 532 * let *a1, ..., an* be the elements of [positionalArguments] |
533 * let *k1, ..., km* be the identifiers denoted by the elements of | 533 * let *k1, ..., km* be the identifiers denoted by the elements of |
534 * [namedArguments.keys] | 534 * [namedArguments.keys] |
535 * and let *v1, ..., vm* be the elements of [namedArguments.values]. | 535 * and let *v1, ..., vm* be the elements of [namedArguments.values]. |
536 * Then this method will perform the method invocation | 536 * Then this method will perform the method invocation |
537 * *f(a1, ..., an, k1: v1, ..., km: vm)* | 537 * *f(a1, ..., an, k1: v1, ..., km: vm)* |
538 * If the invocation returns a result *r*, this method returns | 538 * If the invocation returns a result *r*, this method returns |
539 * the result of calling [reflect](*r*). | 539 * the result of calling [reflect](*r*). |
540 * If the invocation causes a compilation error | 540 * If the invocation causes a compilation error |
541 * this method throws a [MirrorError]. | 541 * the effect is the same as if a non-reflective compilation error |
| 542 * had been encountered. |
542 * If the invocation throws an exception *e* (that it does not catch) | 543 * If the invocation throws an exception *e* (that it does not catch) |
543 * this method throws *e*. | 544 * this method throws *e*. |
544 */ | 545 */ |
545 InstanceMirror apply(List positionalArguments, | 546 InstanceMirror apply(List positionalArguments, |
546 [Map<Symbol, dynamic> namedArguments]); | 547 [Map<Symbol, dynamic> namedArguments]); |
547 | 548 |
548 /** | 549 /** |
549 * Not yet supported. Calling this method throws an [UnsupportedError]. | 550 * Not yet supported. Calling this method throws an [UnsupportedError]. |
550 */ | 551 */ |
551 InstanceMirror findInContext(Symbol name, {ifAbsent: null}); | 552 InstanceMirror findInContext(Symbol name, {ifAbsent: null}); |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 * | 1194 * |
1194 * When used as metadata on an import of "dart:mirrors", this metadata does | 1195 * When used as metadata on an import of "dart:mirrors", this metadata does |
1195 * not apply to the library in which the annotation is used, but instead | 1196 * not apply to the library in which the annotation is used, but instead |
1196 * applies to the other libraries (all libraries if "*" is used). | 1197 * applies to the other libraries (all libraries if "*" is used). |
1197 */ | 1198 */ |
1198 final override; | 1199 final override; |
1199 | 1200 |
1200 const MirrorsUsed( | 1201 const MirrorsUsed( |
1201 {this.symbols, this.targets, this.metaTargets, this.override}); | 1202 {this.symbols, this.targets, this.metaTargets, this.override}); |
1202 } | 1203 } |
OLD | NEW |