Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |