| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 * If the expression *s* occurs within the source code of the reflectee, | 619 * If the expression *s* occurs within the source code of the reflectee, |
| 620 * and that any such occurrence refers to a declaration outside the reflectee, | 620 * and that any such occurrence refers to a declaration outside the reflectee, |
| 621 * then let *v* be the result of evaluating the expression *s* at such | 621 * then let *v* be the result of evaluating the expression *s* at such |
| 622 * an occurrence. | 622 * an occurrence. |
| 623 * If *s = this*, and the reflectee was defined within the instance scope of | 623 * If *s = this*, and the reflectee was defined within the instance scope of |
| 624 * an object *o*, then let *v* be *o*. | 624 * an object *o*, then let *v* be *o*. |
| 625 * | 625 * |
| 626 * The returned value is the result of invoking the method [reflect] on | 626 * The returned value is the result of invoking the method [reflect] on |
| 627 * *v*. | 627 * *v*. |
| 628 */ | 628 */ |
| 629 Future<InstanceMirror> findInContext(Symbol name); | 629 InstanceMirror findInContext(Symbol name, {ifAbsent: null}); |
| 630 } | 630 } |
| 631 | 631 |
| 632 /** | 632 /** |
| 633 * A [LibraryMirror] reflects a Dart language library, providing | 633 * A [LibraryMirror] reflects a Dart language library, providing |
| 634 * access to the variables, functions, and classes of the | 634 * access to the variables, functions, and classes of the |
| 635 * library. | 635 * library. |
| 636 */ | 636 */ |
| 637 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { | 637 abstract class LibraryMirror implements DeclarationMirror, ObjectMirror { |
| 638 /** | 638 /** |
| 639 * The absolute uri of the library. | 639 * The absolute uri of the library. |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 * | 1347 * |
| 1348 * When used as metadata on an import of "dart:mirrors", this metadata does | 1348 * When used as metadata on an import of "dart:mirrors", this metadata does |
| 1349 * not apply to the library in which the annotation is used, but instead | 1349 * not apply to the library in which the annotation is used, but instead |
| 1350 * applies to the other libraries (all libraries if "*" is used). | 1350 * applies to the other libraries (all libraries if "*" is used). |
| 1351 */ | 1351 */ |
| 1352 final override; | 1352 final override; |
| 1353 | 1353 |
| 1354 const MirrorsUsed( | 1354 const MirrorsUsed( |
| 1355 {this.symbols, this.targets, this.metaTargets, this.override}); | 1355 {this.symbols, this.targets, this.metaTargets, this.override}); |
| 1356 } | 1356 } |
| OLD | NEW |