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

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

Issue 10778005: Add a limited version of ParameterMirrors that can only tell whether they are (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « no previous file | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')
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 // #library("mirrors"); 5 // #library("mirrors");
6 6
7 // The dart:mirrors library provides reflective access for Dart program. 7 // The dart:mirrors library provides reflective access for Dart program.
8 // 8 //
9 // For the purposes of the mirrors library, we adopt a naming 9 // For the purposes of the mirrors library, we adopt a naming
10 // convention with respect to getters and setters. Specifically, for 10 // convention with respect to getters and setters. Specifically, for
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 /** 349 /**
350 * Does this mirror reflect a redirecting constructor? 350 * Does this mirror reflect a redirecting constructor?
351 */ 351 */
352 bool isRedirectingConstructor; 352 bool isRedirectingConstructor;
353 353
354 /** 354 /**
355 * Does this mirror reflect a factory constructor? 355 * Does this mirror reflect a factory constructor?
356 */ 356 */
357 bool isFactoryConstructor; 357 bool isFactoryConstructor;
358
359 /**
360 * Returns the list of parameters for this method.
361 */
362 List<ParameterMirror> parameters();
358 } 363 }
359 364
365 /**
366 * A formal parameter.
turnidge 2012/07/13 23:37:12 Make this comment look more like others in the fil
367 */
368 interface ParameterMirror extends VariableMirror {
369 /**
370 * Returns the type of this parameter.
371 */
372 TypeMirror type();
373
374 /**
375 * Returns the default value for this parameter.
376 */
377 String defaultValue();
378
379 /**
380 * Returns true if this parameter has a default value.
381 */
382 bool hasDefaultValue();
383
384 /**
385 * Returns true if this parameter is optional.
386 */
387 bool isOptional();
388 }
360 389
361 /** 390 /**
362 * A [VariableMirror] reflects a Dart language variable. 391 * A [VariableMirror] reflects a Dart language variable.
363 */ 392 */
364 interface VariableMirror { 393 interface VariableMirror {
365 /** 394 /**
366 * The name of this variable 395 * The name of this variable
367 */ 396 */
368 final String simpleName; 397 final String simpleName;
369 398
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 499
471 /** 500 /**
472 * A [MirrorException] is used to indicate errors within the mirrors 501 * A [MirrorException] is used to indicate errors within the mirrors
473 * framework. 502 * framework.
474 */ 503 */
475 class MirrorException implements Exception { 504 class MirrorException implements Exception {
476 const MirrorException(String this._message); 505 const MirrorException(String this._message);
477 String toString() => "MirrorException: '$_message'"; 506 String toString() => "MirrorException: '$_message'";
478 final String _message; 507 final String _message;
479 } 508 }
OLDNEW
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698