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 /** | 5 /** |
6 * A [MirrorSystem] is the main interface used to reflect on a set of | 6 * A [MirrorSystem] is the main interface used to reflect on a set of |
7 * associated libraries. | 7 * associated libraries. |
8 * | 8 * |
9 * At runtime each running isolate has a distinct [MirrorSystem]. | 9 * At runtime each running isolate has a distinct [MirrorSystem]. |
10 * | 10 * |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 | 716 |
717 /** | 717 /** |
718 * A [MirrorException] is used to indicate errors within the mirrors | 718 * A [MirrorException] is used to indicate errors within the mirrors |
719 * framework. | 719 * framework. |
720 */ | 720 */ |
721 class MirrorException implements Exception { | 721 class MirrorException implements Exception { |
722 const MirrorException(String this._message); | 722 const MirrorException(String this._message); |
723 String toString() => "MirrorException: '$_message'"; | 723 String toString() => "MirrorException: '$_message'"; |
724 final String _message; | 724 final String _message; |
725 } | 725 } |
| 726 |
| 727 /** |
| 728 * Class used for encoding comments as metadata annotations. |
| 729 */ |
| 730 class Comment { |
| 731 /** |
| 732 * The comment text as written in the source text. |
| 733 */ |
| 734 final String text; |
| 735 |
| 736 /** |
| 737 * The comment text without the start, end, and padding text. |
| 738 * |
| 739 * For example, if [text] is [: /** Comment text. */ :] then the [trimmedText] |
| 740 * is [: Comment text. :]. |
| 741 */ |
| 742 final String trimmedText; |
| 743 |
| 744 /** |
| 745 * Is [:true:] if this comment is a documentation comment. |
| 746 * |
| 747 * That is, that the comment is either enclosed in [: /** ... */ :] or starts |
| 748 * with [: /// :]. |
| 749 */ |
| 750 final bool isDocComment; |
| 751 |
| 752 const Comment(this.text, this.trimmedText, this.isDocComment); |
| 753 } |
OLD | NEW |