| 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 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:uri'); | 8 #import('dart:uri'); |
| 9 | 9 |
| 10 // TODO(rnystrom): Use "package:" URL (#4968). | 10 // TODO(rnystrom): Use "package:" URL (#4968). |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 * For instance [:void f(int):] for a [:typedef void f(int):]. | 384 * For instance [:void f(int):] for a [:typedef void f(int):]. |
| 385 */ | 385 */ |
| 386 TypeMirror get value; | 386 TypeMirror get value; |
| 387 } | 387 } |
| 388 | 388 |
| 389 /** | 389 /** |
| 390 * A member of a type, i.e. a field, method or constructor. | 390 * A member of a type, i.e. a field, method or constructor. |
| 391 */ | 391 */ |
| 392 abstract class MemberMirror implements DeclarationMirror { | 392 abstract class MemberMirror implements DeclarationMirror { |
| 393 /** | 393 /** |
| 394 * Returns true if this is a top level member, i.e. a member not within a | |
| 395 * type. | |
| 396 */ | |
| 397 bool get isTopLevel; | |
| 398 | |
| 399 /** | |
| 400 * Returns true if this member is a constructor. | 394 * Returns true if this member is a constructor. |
| 401 */ | 395 */ |
| 402 bool get isConstructor; | 396 bool get isConstructor; |
| 403 | 397 |
| 404 /** | 398 /** |
| 405 * Returns true if this member is a field. | 399 * Returns true if this member is a field. |
| 406 */ | 400 */ |
| 407 bool get isField; | 401 bool get isField; |
| 408 | 402 |
| 409 /** | 403 /** |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 /** | 486 /** |
| 493 * Returns the operator name for operator methods, e.g. [:'<':] for | 487 * Returns the operator name for operator methods, e.g. [:'<':] for |
| 494 * [:operator <:] | 488 * [:operator <:] |
| 495 */ | 489 */ |
| 496 String get operatorName; | 490 String get operatorName; |
| 497 } | 491 } |
| 498 | 492 |
| 499 /** | 493 /** |
| 500 * A formal parameter. | 494 * A formal parameter. |
| 501 */ | 495 */ |
| 502 abstract class ParameterMirror implements Mirror { | 496 abstract class ParameterMirror implements VariableMirror { |
| 503 /** | 497 /** |
| 504 * Returns the type of this parameter. | 498 * Returns the type of this parameter. |
| 505 */ | 499 */ |
| 506 TypeMirror get type; | 500 TypeMirror get type; |
| 507 | 501 |
| 508 /** | 502 /** |
| 509 * Returns the default value for this parameter. | 503 * Returns the default value for this parameter. |
| 510 */ | 504 */ |
| 511 String get defaultValue; | 505 String get defaultValue; |
| 512 | 506 |
| 513 /** | 507 /** |
| 514 * Returns true if this parameter has a default value. | 508 * Does this parameter have a default value? |
| 515 */ | 509 */ |
| 516 bool get hasDefaultValue; | 510 bool get hasDefaultValue; |
| 517 | 511 |
| 518 /** | 512 /** |
| 519 * Returns true if this parameter is optional. | 513 * Is this parameter optional? |
| 520 */ | 514 */ |
| 521 bool get isOptional; | 515 bool get isOptional; |
| 522 | 516 |
| 523 /** | 517 /** |
| 518 * Is this parameter named? |
| 519 */ |
| 520 bool get isNamed; |
| 521 |
| 522 /** |
| 524 * Returns [:true:] iff this parameter is an initializing formal of a | 523 * Returns [:true:] iff this parameter is an initializing formal of a |
| 525 * constructor. That is, if it is of the form [:this.x:] where [:x:] is a | 524 * constructor. That is, if it is of the form [:this.x:] where [:x:] is a |
| 526 * field. | 525 * field. |
| 527 */ | 526 */ |
| 528 bool get isInitializingFormal; | 527 bool get isInitializingFormal; |
| 529 | 528 |
| 530 /** | 529 /** |
| 531 * Returns the initialized field, if this parameter is an initializing formal. | 530 * Returns the initialized field, if this parameter is an initializing formal. |
| 532 */ | 531 */ |
| 533 VariableMirror get initializedField; | 532 VariableMirror get initializedField; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 /** | 569 /** |
| 571 * Returns the URI where the source originated. | 570 * Returns the URI where the source originated. |
| 572 */ | 571 */ |
| 573 Uri get uri; | 572 Uri get uri; |
| 574 | 573 |
| 575 /** | 574 /** |
| 576 * Returns the text of this source. | 575 * Returns the text of this source. |
| 577 */ | 576 */ |
| 578 String get text; | 577 String get text; |
| 579 } | 578 } |
| OLD | NEW |