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

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

Issue 22633005: Make reflectClass(dynamic) throw an illegal argument exception. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 * obtain mirrors on objects of the current isolate. 128 * obtain mirrors on objects of the current isolate.
129 */ 129 */
130 external InstanceMirror reflect(Object reflectee); 130 external InstanceMirror reflect(Object reflectee);
131 131
132 /** 132 /**
133 * Let *C* be the original class declaration of the class 133 * Let *C* be the original class declaration of the class
134 * represented by [key]. 134 * represented by [key].
135 * This function returns a [ClassMirror] reflecting *C*. 135 * This function returns a [ClassMirror] reflecting *C*.
136 * 136 *
137 * If [key] is not an instance of [Type] then this function 137 * If [key] is not an instance of [Type] then this function
138 * throws an [ArgumentError]. 138 * throws an [ArgumentError]. If [key] is the Type dynamic,
139 * throws an [ArgumentError] because dynamic is not a class.
139 * 140 *
140 * Note that since one cannot obtain a [Type] object from 141 * Note that since one cannot obtain a [Type] object from
141 * another isolate, this function can only be used to 142 * another isolate, this function can only be used to
142 * obtain class mirrors on classes of the current isolate. 143 * obtain class mirrors on classes of the current isolate.
143 */ 144 */
144 external ClassMirror reflectClass(Type key); 145 external ClassMirror reflectClass(Type key);
145 146
146 /** 147 /**
147 * A [Mirror] reflects some Dart language entity. 148 * A [Mirror] reflects some Dart language entity.
148 * 149 *
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 * 1319 *
1319 * When used as metadata on an import of "dart:mirrors", this metadata does 1320 * When used as metadata on an import of "dart:mirrors", this metadata does
1320 * not apply to the library in which the annotation is used, but instead 1321 * not apply to the library in which the annotation is used, but instead
1321 * applies to the other libraries (all libraries if "*" is used). 1322 * applies to the other libraries (all libraries if "*" is used).
1322 */ 1323 */
1323 final override; 1324 final override;
1324 1325
1325 const MirrorsUsed( 1326 const MirrorsUsed(
1326 {this.symbols, this.targets, this.metaTargets, this.override}); 1327 {this.symbols, this.targets, this.metaTargets, this.override});
1327 } 1328 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698