| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 * A [ClosureMirror] provides access to its captured variables and | 525 * A [ClosureMirror] provides access to its captured variables and |
| 526 * provides the ability to execute its reflectee. | 526 * provides the ability to execute its reflectee. |
| 527 */ | 527 */ |
| 528 abstract class ClosureMirror implements InstanceMirror { | 528 abstract class ClosureMirror implements InstanceMirror { |
| 529 /** | 529 /** |
| 530 * A mirror on the function associated with this closure. | 530 * A mirror on the function associated with this closure. |
| 531 */ | 531 */ |
| 532 MethodMirror get function; | 532 MethodMirror get function; |
| 533 | 533 |
| 534 /** | 534 /** |
| 535 * The source code for this closure, if available. Otherwise null. | |
| 536 * | |
| 537 * TODO(turnidge): Would this just be available in function? | |
| 538 */ | |
| 539 String get source; | |
| 540 | |
| 541 /** | |
| 542 * Executes the closure and returns a mirror on the result. | 535 * Executes the closure and returns a mirror on the result. |
| 543 * Let *f* be the closure reflected by this mirror, | 536 * Let *f* be the closure reflected by this mirror, |
| 544 * let *a1, ..., an* be the elements of [positionalArguments] | 537 * let *a1, ..., an* be the elements of [positionalArguments] |
| 545 * let *k1, ..., km* be the identifiers denoted by the elements of | 538 * let *k1, ..., km* be the identifiers denoted by the elements of |
| 546 * [namedArguments.keys] | 539 * [namedArguments.keys] |
| 547 * and let *v1, ..., vm* be the elements of [namedArguments.values]. | 540 * and let *v1, ..., vm* be the elements of [namedArguments.values]. |
| 548 * Then this method will perform the method invocation | 541 * Then this method will perform the method invocation |
| 549 * *f(a1, ..., an, k1: v1, ..., km: vm)* | 542 * *f(a1, ..., an, k1: v1, ..., km: vm)* |
| 550 * If the invocation returns a result *r*, this method returns | 543 * If the invocation returns a result *r*, this method returns |
| 551 * the result of calling [reflect](*r*). | 544 * the result of calling [reflect](*r*). |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 * A [MethodMirror] reflects a Dart language function, method, | 939 * A [MethodMirror] reflects a Dart language function, method, |
| 947 * constructor, getter, or setter. | 940 * constructor, getter, or setter. |
| 948 */ | 941 */ |
| 949 abstract class MethodMirror implements DeclarationMirror { | 942 abstract class MethodMirror implements DeclarationMirror { |
| 950 /** | 943 /** |
| 951 * A mirror on the return type for the reflectee. | 944 * A mirror on the return type for the reflectee. |
| 952 */ | 945 */ |
| 953 TypeMirror get returnType; | 946 TypeMirror get returnType; |
| 954 | 947 |
| 955 /** | 948 /** |
| 949 * The source code for the reflectee, if available. Otherwise null. |
| 950 */ |
| 951 String get source; |
| 952 |
| 953 /** |
| 956 * A list of mirrors on the parameters for the reflectee. | 954 * A list of mirrors on the parameters for the reflectee. |
| 957 */ | 955 */ |
| 958 List<ParameterMirror> get parameters; | 956 List<ParameterMirror> get parameters; |
| 959 | 957 |
| 960 /** | 958 /** |
| 961 * Is the reflectee static? | 959 * Is the reflectee static? |
| 962 * | 960 * |
| 963 * For the purposes of the mirrors library, a top-level function is | 961 * For the purposes of the mirrors library, a top-level function is |
| 964 * considered static. | 962 * considered static. |
| 965 */ | 963 */ |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 * | 1317 * |
| 1320 * When used as metadata on an import of "dart:mirrors", this metadata does | 1318 * When used as metadata on an import of "dart:mirrors", this metadata does |
| 1321 * not apply to the library in which the annotation is used, but instead | 1319 * not apply to the library in which the annotation is used, but instead |
| 1322 * applies to the other libraries (all libraries if "*" is used). | 1320 * applies to the other libraries (all libraries if "*" is used). |
| 1323 */ | 1321 */ |
| 1324 final override; | 1322 final override; |
| 1325 | 1323 |
| 1326 const MirrorsUsed( | 1324 const MirrorsUsed( |
| 1327 {this.symbols, this.targets, this.metaTargets, this.override}); | 1325 {this.symbols, this.targets, this.metaTargets, this.override}); |
| 1328 } | 1326 } |
| OLD | NEW |