| 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 */ | 608 */ |
| 609 Function operator [](Symbol name); | 609 Function operator [](Symbol name); |
| 610 } | 610 } |
| 611 | 611 |
| 612 /** | 612 /** |
| 613 * A [TypeMirror] reflects a Dart language class, typedef, | 613 * A [TypeMirror] reflects a Dart language class, typedef, |
| 614 * function type or type variable. | 614 * function type or type variable. |
| 615 */ | 615 */ |
| 616 abstract class TypeMirror implements DeclarationMirror { | 616 abstract class TypeMirror implements DeclarationMirror { |
| 617 /** | 617 /** |
| 618 * Returns true if this mirror reflects dynamic, a non-generic class or |
| 619 * typedef, or an instantiated generic class or typedef in the current |
| 620 * isolate. Otherwise, returns false. |
| 621 */ |
| 622 bool get hasReflectedType; |
| 623 |
| 624 /** |
| 625 * If [:hasReflectedType:] returns true, returns the corresponding [Type]. |
| 626 * Otherwise, an [UnsupportedError] is thrown. |
| 627 */ |
| 628 Type get reflectedType; |
| 629 |
| 630 /** |
| 618 * An immutable list with mirrors for all type variables for this type. | 631 * An immutable list with mirrors for all type variables for this type. |
| 619 * | 632 * |
| 620 * If this type is a generic declaration or an invocation of a generic | 633 * If this type is a generic declaration or an invocation of a generic |
| 621 * declaration, the returned list contains mirrors on the type variables | 634 * declaration, the returned list contains mirrors on the type variables |
| 622 * declared in the original declaration. | 635 * declared in the original declaration. |
| 623 * Otherwise, the returned list is empty. | 636 * Otherwise, the returned list is empty. |
| 624 * | 637 * |
| 625 * This list preserves the order of declaration of the type variables. | 638 * This list preserves the order of declaration of the type variables. |
| 626 */ | 639 */ |
| 627 List<TypeVariableMirror> get typeVariables; | 640 List<TypeVariableMirror> get typeVariables; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 * checked mode. | 689 * checked mode. |
| 677 */ | 690 */ |
| 678 bool isAssignableTo(TypeMirror other); | 691 bool isAssignableTo(TypeMirror other); |
| 679 } | 692 } |
| 680 | 693 |
| 681 /** | 694 /** |
| 682 * A [ClassMirror] reflects a Dart language class. | 695 * A [ClassMirror] reflects a Dart language class. |
| 683 */ | 696 */ |
| 684 abstract class ClassMirror implements TypeMirror, ObjectMirror { | 697 abstract class ClassMirror implements TypeMirror, ObjectMirror { |
| 685 /** | 698 /** |
| 686 * Returns true if this mirror reflects a non-generic class or an instantiated | |
| 687 * generic class in the current isolate. Otherwise, returns false. | |
| 688 */ | |
| 689 bool get hasReflectedType; | |
| 690 | |
| 691 /** | |
| 692 * If [:hasReflectedType:] returns true, returns the corresponding [Type]. | |
| 693 * Otherwise, an [UnsupportedError] is thrown. | |
| 694 */ | |
| 695 Type get reflectedType; | |
| 696 | |
| 697 /** | |
| 698 * A mirror on the superclass on the reflectee. | 699 * A mirror on the superclass on the reflectee. |
| 699 * | 700 * |
| 700 * If this type is [:Object:], the superclass will be null. | 701 * If this type is [:Object:], the superclass will be null. |
| 701 */ | 702 */ |
| 702 ClassMirror get superclass; | 703 ClassMirror get superclass; |
| 703 | 704 |
| 704 /** | 705 /** |
| 705 * A list of mirrors on the superinterfaces of the reflectee. | 706 * A list of mirrors on the superinterfaces of the reflectee. |
| 706 */ | 707 */ |
| 707 List<ClassMirror> get superinterfaces; | 708 List<ClassMirror> get superinterfaces; |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 * | 1227 * |
| 1227 * When used as metadata on an import of "dart:mirrors", this metadata does | 1228 * When used as metadata on an import of "dart:mirrors", this metadata does |
| 1228 * not apply to the library in which the annotation is used, but instead | 1229 * not apply to the library in which the annotation is used, but instead |
| 1229 * applies to the other libraries (all libraries if "*" is used). | 1230 * applies to the other libraries (all libraries if "*" is used). |
| 1230 */ | 1231 */ |
| 1231 final override; | 1232 final override; |
| 1232 | 1233 |
| 1233 const MirrorsUsed( | 1234 const MirrorsUsed( |
| 1234 {this.symbols, this.targets, this.metaTargets, this.override}); | 1235 {this.symbols, this.targets, this.metaTargets, this.override}); |
| 1235 } | 1236 } |
| OLD | NEW |