OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 * | 600 * |
601 * (r1, ..., rn, [p1 = d1, ..., pk = dk]) { | 601 * (r1, ..., rn, [p1 = d1, ..., pk = dk]) { |
602 * return this.invoke(name, [r1, ..., rn, p1, ..., pk]); | 602 * return this.invoke(name, [r1, ..., rn, p1, ..., pk]); |
603 * } | 603 * } |
604 * | 604 * |
605 * if m has required parameters r1, ..., rn, and optional positional | 605 * if m has required parameters r1, ..., rn, and optional positional |
606 * parameters p1, ..., pk with defaults d1, ..., dk. Otherwise, an | 606 * parameters p1, ..., pk with defaults d1, ..., dk. Otherwise, an |
607 * [ArgumentError] is thrown. | 607 * [ArgumentError] is thrown. |
608 */ | 608 */ |
609 Function operator [](Symbol name); | 609 Function operator [](Symbol name); |
| 610 |
| 611 /** |
| 612 * Returns a list of the imports and exports in this library; |
| 613 */ |
| 614 List<LibraryDependencyMirror> get libraryDependencies; |
| 615 } |
| 616 |
| 617 /// A mirror on an import or export declaration. |
| 618 abstract class LibraryDependencyMirror { |
| 619 /// Is `true` if this dependency is an import. |
| 620 bool get isImport; |
| 621 |
| 622 /// Is `true` if this dependency is an export. |
| 623 bool get isExport; |
| 624 |
| 625 /// Returns the library mirror of the library that imports or exports the |
| 626 /// [targetLibrary]. |
| 627 LibraryMirror get sourceLibrary; |
| 628 |
| 629 /// Returns the library mirror of the library that is imported or exported. |
| 630 LibraryMirror get targetLibrary; |
| 631 |
| 632 /// Returns the prefix if this is a prefixed import and `null` otherwise. |
| 633 Symbol get prefix; |
| 634 |
| 635 /// Returns the list of show/hide combinators on the import/export |
| 636 /// declaration. |
| 637 List<CombinatorMirror> get combinators; |
| 638 |
| 639 /// Returns the source location for this import/export declaration. |
| 640 SourceLocation get location; |
| 641 |
| 642 List<InstanceMirror> get metadata; |
| 643 } |
| 644 |
| 645 /// A mirror on a show/hide combinator declared on a library dependency. |
| 646 abstract class CombinatorMirror { |
| 647 /// The list of identifiers on the combinator. |
| 648 List<Symbol> get identifiers; |
| 649 |
| 650 /// Is `true` if this is a 'show' combinator. |
| 651 bool get isShow; |
| 652 |
| 653 /// Is `true` if this is a 'hide' combinator. |
| 654 bool get isHide; |
610 } | 655 } |
611 | 656 |
612 /** | 657 /** |
613 * A [TypeMirror] reflects a Dart language class, typedef, | 658 * A [TypeMirror] reflects a Dart language class, typedef, |
614 * function type or type variable. | 659 * function type or type variable. |
615 */ | 660 */ |
616 abstract class TypeMirror implements DeclarationMirror { | 661 abstract class TypeMirror implements DeclarationMirror { |
617 /** | 662 /** |
618 * Returns true if this mirror reflects dynamic, a non-generic class or | 663 * Returns true if this mirror reflects dynamic, a non-generic class or |
619 * typedef, or an instantiated generic class or typedef in the current | 664 * typedef, or an instantiated generic class or typedef in the current |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 * | 1272 * |
1228 * When used as metadata on an import of "dart:mirrors", this metadata does | 1273 * When used as metadata on an import of "dart:mirrors", this metadata does |
1229 * not apply to the library in which the annotation is used, but instead | 1274 * not apply to the library in which the annotation is used, but instead |
1230 * applies to the other libraries (all libraries if "*" is used). | 1275 * applies to the other libraries (all libraries if "*" is used). |
1231 */ | 1276 */ |
1232 final override; | 1277 final override; |
1233 | 1278 |
1234 const MirrorsUsed( | 1279 const MirrorsUsed( |
1235 {this.symbols, this.targets, this.metaTargets, this.override}); | 1280 {this.symbols, this.targets, this.metaTargets, this.override}); |
1236 } | 1281 } |
OLD | NEW |