| 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 // The dart:mirrors library provides reflective access for Dart program. | 5 // Commented out until supported by VM. |
| 6 // | 6 // part of dart.mirrors; |
| 7 |
| 7 // For the purposes of the mirrors library, we adopt a naming | 8 // For the purposes of the mirrors library, we adopt a naming |
| 8 // convention with respect to getters and setters. Specifically, for | 9 // convention with respect to getters and setters. Specifically, for |
| 9 // some variable or field... | 10 // some variable or field... |
| 10 // | 11 // |
| 11 // var myField; | 12 // var myField; |
| 12 // | 13 // |
| 13 // ...the getter is named 'myField' and the setter is named | 14 // ...the getter is named 'myField' and the setter is named |
| 14 // 'myField='. This allows us to assign unique names to getters and | 15 // 'myField='. This allows us to assign unique names to getters and |
| 15 // setters for the purposes of member lookup. | 16 // setters for the purposes of member lookup. |
| 16 | 17 |
| 17 // #library("mirrors"); | |
| 18 | |
| 19 /** | 18 /** |
| 20 * A [MirrorSystem] is the main interface used to reflect on a set of | 19 * A [MirrorSystem] is the main interface used to reflect on a set of |
| 21 * associated libraries. | 20 * associated libraries. |
| 22 * | 21 * |
| 23 * At runtime each running isolate has a distinct [MirrorSystem]. | 22 * At runtime each running isolate has a distinct [MirrorSystem]. |
| 24 * | 23 * |
| 25 * It is also possible to have a [MirrorSystem] which represents a set | 24 * It is also possible to have a [MirrorSystem] which represents a set |
| 26 * of libraries which are not running -- perhaps at compile-time. In | 25 * of libraries which are not running -- perhaps at compile-time. In |
| 27 * this case, all available reflective functionality would be | 26 * this case, all available reflective functionality would be |
| 28 * supported, but runtime functionality (such as invoking a function | 27 * supported, but runtime functionality (such as invoking a function |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 | 735 |
| 737 /** | 736 /** |
| 738 * A [MirrorException] is used to indicate errors within the mirrors | 737 * A [MirrorException] is used to indicate errors within the mirrors |
| 739 * framework. | 738 * framework. |
| 740 */ | 739 */ |
| 741 class MirrorException implements Exception { | 740 class MirrorException implements Exception { |
| 742 const MirrorException(String this._message); | 741 const MirrorException(String this._message); |
| 743 String toString() => "MirrorException: '$_message'"; | 742 String toString() => "MirrorException: '$_message'"; |
| 744 final String _message; | 743 final String _message; |
| 745 } | 744 } |
| OLD | NEW |