| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 * the result of calling [reflect](*r*). | 532 * the result of calling [reflect](*r*). |
| 533 * If the invocation causes a compilation error | 533 * If the invocation causes a compilation error |
| 534 * this method throws a [MirrorError]. | 534 * this method throws a [MirrorError]. |
| 535 * If the invocation throws an exception *e* (that it does not catch) | 535 * If the invocation throws an exception *e* (that it does not catch) |
| 536 * this method throws *e*. | 536 * this method throws *e*. |
| 537 */ | 537 */ |
| 538 InstanceMirror apply(List positionalArguments, | 538 InstanceMirror apply(List positionalArguments, |
| 539 [Map<Symbol, dynamic> namedArguments]); | 539 [Map<Symbol, dynamic> namedArguments]); |
| 540 | 540 |
| 541 /** | 541 /** |
| 542 * Looks up the value of a name in the scope of the closure. The | 542 * Not yet supported. Calling this method throws an [UnsupportedError]. |
| 543 * result is a mirror on that value. | |
| 544 * | |
| 545 * Let *s* be the contents of the string used to construct the symbol [name]. | |
| 546 * | |
| 547 * If the expression *s* occurs within the source code of the reflectee, | |
| 548 * and if any such occurrence refers to a declaration outside the reflectee, | |
| 549 * then let *v* be the result of evaluating the expression *s* at such | |
| 550 * an occurrence. | |
| 551 * If *s = this*, and the reflectee was defined within the instance scope of | |
| 552 * an object *o*, then let *v* be *o*. | |
| 553 * | |
| 554 * The returned value is the result of invoking the method [reflect] on | |
| 555 * *v*. | |
| 556 */ | 543 */ |
| 557 InstanceMirror findInContext(Symbol name, {ifAbsent: null}); | 544 InstanceMirror findInContext(Symbol name, {ifAbsent: null}); |
| 558 } | 545 } |
| 559 | 546 |
| 560 /** | 547 /** |
| 561 * A [LibraryMirror] reflects a Dart language library, providing | 548 * A [LibraryMirror] reflects a Dart language library, providing |
| 562 * access to the variables, functions, and classes of the | 549 * access to the variables, functions, and classes of the |
| 563 * library. | 550 * library. |
| 564 */ | 551 */ |
| 565 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { | 552 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 * | 1182 * |
| 1196 * When used as metadata on an import of "dart:mirrors", this metadata does | 1183 * When used as metadata on an import of "dart:mirrors", this metadata does |
| 1197 * not apply to the library in which the annotation is used, but instead | 1184 * not apply to the library in which the annotation is used, but instead |
| 1198 * applies to the other libraries (all libraries if "*" is used). | 1185 * applies to the other libraries (all libraries if "*" is used). |
| 1199 */ | 1186 */ |
| 1200 final override; | 1187 final override; |
| 1201 | 1188 |
| 1202 const MirrorsUsed( | 1189 const MirrorsUsed( |
| 1203 {this.symbols, this.targets, this.metaTargets, this.override}); | 1190 {this.symbols, this.targets, this.metaTargets, this.override}); |
| 1204 } | 1191 } |
| OLD | NEW |