Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: sdk/lib/mirrors/mirrors.dart

Issue 22849015: Provide a way to get a Type back from a ClassMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 * or type variable. 675 * or type variable.
676 */ 676 */
677 abstract class TypeMirror implements DeclarationMirror { 677 abstract class TypeMirror implements DeclarationMirror {
678 } 678 }
679 679
680 /** 680 /**
681 * A [ClassMirror] reflects a Dart language class. 681 * A [ClassMirror] reflects a Dart language class.
682 */ 682 */
683 abstract class ClassMirror implements TypeMirror, ObjectMirror { 683 abstract class ClassMirror implements TypeMirror, ObjectMirror {
684 /** 684 /**
685 * Returns true if this mirror reflects a non-generic class or an instantiated
686 * generic class in the current isolate. Otherwise, returns false.
687 */
688 bool get hasReflectedType;
689
690 /**
691 * If [:hasReflectedType:] returns true, returns the corresponding [Type].
692 * Otherwise, an [UnsupportedError] is thrown.
693 */
694 Type get reflectedType;
695
696 /**
685 * A mirror on the superclass on the reflectee. 697 * A mirror on the superclass on the reflectee.
686 * 698 *
687 * If this type is [:Object:] or a typedef, the superClass will be 699 * If this type is [:Object:] or a typedef, the superClass will be
688 * null. 700 * null.
689 */ 701 */
690 ClassMirror get superclass; 702 ClassMirror get superclass;
691 703
692 /** 704 /**
693 * A list of mirrors on the superinterfaces of the reflectee. 705 * A list of mirrors on the superinterfaces of the reflectee.
694 */ 706 */
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 * 1318 *
1307 * When used as metadata on an import of "dart:mirrors", this metadata does 1319 * When used as metadata on an import of "dart:mirrors", this metadata does
1308 * not apply to the library in which the annotation is used, but instead 1320 * not apply to the library in which the annotation is used, but instead
1309 * applies to the other libraries (all libraries if "*" is used). 1321 * applies to the other libraries (all libraries if "*" is used).
1310 */ 1322 */
1311 final override; 1323 final override;
1312 1324
1313 const MirrorsUsed( 1325 const MirrorsUsed(
1314 {this.symbols, this.targets, this.metaTargets, this.override}); 1326 {this.symbols, this.targets, this.metaTargets, this.override});
1315 } 1327 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | tests/lib/lib.status » ('j') | tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698