| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 */ | 175 */ |
| 176 Map<String, MethodMirror> get getters; | 176 Map<String, MethodMirror> get getters; |
| 177 | 177 |
| 178 /** | 178 /** |
| 179 * An immutable map from names to mirrors for all setter | 179 * An immutable map from names to mirrors for all setter |
| 180 * declarations in this library. | 180 * declarations in this library. |
| 181 */ | 181 */ |
| 182 Map<String, MethodMirror> get setters; | 182 Map<String, MethodMirror> get setters; |
| 183 | 183 |
| 184 /** | 184 /** |
| 185 * An immutable map from names to mirrors for all variable |
| 186 * declarations in this library. |
| 187 */ |
| 188 Map<String, VariableMirror> get variables; |
| 189 |
| 190 /** |
| 185 * Returns the canonical URI for this library. | 191 * Returns the canonical URI for this library. |
| 186 */ | 192 */ |
| 187 Uri get uri; | 193 Uri get uri; |
| 188 } | 194 } |
| 189 | 195 |
| 190 /** | 196 /** |
| 191 * Common interface for classes, interfaces, typedefs and type variables. | 197 * Common interface for classes, interfaces, typedefs and type variables. |
| 192 */ | 198 */ |
| 193 abstract class TypeMirror implements DeclarationMirror { | 199 abstract class TypeMirror implements DeclarationMirror { |
| 194 /** | 200 /** |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 */ | 320 */ |
| 315 Map<String, MethodMirror> get getters; | 321 Map<String, MethodMirror> get getters; |
| 316 | 322 |
| 317 /** | 323 /** |
| 318 * An immutable map from names to mirrors for all setter | 324 * An immutable map from names to mirrors for all setter |
| 319 * declarations for this type. | 325 * declarations for this type. |
| 320 */ | 326 */ |
| 321 Map<String, MethodMirror> get setters; | 327 Map<String, MethodMirror> get setters; |
| 322 | 328 |
| 323 /** | 329 /** |
| 330 * An immutable map from names to mirrors for all variable |
| 331 * declarations for this type. |
| 332 */ |
| 333 Map<String, VariableMirror> get variables; |
| 334 |
| 335 /** |
| 324 * An immutable map from names to mirrors for all constructor | 336 * An immutable map from names to mirrors for all constructor |
| 325 * declarations for this type. | 337 * declarations for this type. |
| 326 */ | 338 */ |
| 327 Map<String, MethodMirror> get constructors; | 339 Map<String, MethodMirror> get constructors; |
| 328 | 340 |
| 329 /** | 341 /** |
| 330 * Returns the default type for this interface. | 342 * Returns the default type for this interface. |
| 331 */ | 343 */ |
| 332 ClassMirror get defaultFactory; | 344 ClassMirror get defaultFactory; |
| 333 } | 345 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 421 |
| 410 /** | 422 /** |
| 411 * Returns true if this member is static. | 423 * Returns true if this member is static. |
| 412 */ | 424 */ |
| 413 bool get isStatic; | 425 bool get isStatic; |
| 414 } | 426 } |
| 415 | 427 |
| 416 /** | 428 /** |
| 417 * A field. | 429 * A field. |
| 418 */ | 430 */ |
| 419 abstract class FieldMirror implements MemberMirror { | 431 abstract class VariableMirror implements MemberMirror { |
| 420 | 432 |
| 421 /** | 433 /** |
| 422 * Returns true if this field is final. | 434 * Returns true if this field is final. |
| 423 */ | 435 */ |
| 424 bool get isFinal; | 436 bool get isFinal; |
| 425 | 437 |
| 426 /** | 438 /** |
| 427 * Returns true if this field is const. | 439 * Returns true if this field is const. |
| 428 */ | 440 */ |
| 429 bool get isConst; | 441 bool get isConst; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 /** | 531 /** |
| 520 * Returns [:true:] iff this parameter is an initializing formal of a | 532 * Returns [:true:] iff this parameter is an initializing formal of a |
| 521 * constructor. That is, if it is of the form [:this.x:] where [:x:] is a | 533 * constructor. That is, if it is of the form [:this.x:] where [:x:] is a |
| 522 * field. | 534 * field. |
| 523 */ | 535 */ |
| 524 bool get isInitializingFormal; | 536 bool get isInitializingFormal; |
| 525 | 537 |
| 526 /** | 538 /** |
| 527 * Returns the initialized field, if this parameter is an initializing formal. | 539 * Returns the initialized field, if this parameter is an initializing formal. |
| 528 */ | 540 */ |
| 529 FieldMirror get initializedField; | 541 VariableMirror get initializedField; |
| 530 } | 542 } |
| 531 | 543 |
| 532 /** | 544 /** |
| 533 * A [SourceLocation] describes the span of an entity in Dart source code. | 545 * A [SourceLocation] describes the span of an entity in Dart source code. |
| 534 * A [SourceLocation] should be the minimum span that encloses the declaration | 546 * A [SourceLocation] should be the minimum span that encloses the declaration |
| 535 * of the mirrored entity. | 547 * of the mirrored entity. |
| 536 */ | 548 */ |
| 537 abstract class SourceLocation { | 549 abstract class SourceLocation { |
| 538 /** | 550 /** |
| 539 * The character position where the location begins. | 551 * The character position where the location begins. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 566 /** | 578 /** |
| 567 * Returns the URI where the source originated. | 579 * Returns the URI where the source originated. |
| 568 */ | 580 */ |
| 569 Uri get uri; | 581 Uri get uri; |
| 570 | 582 |
| 571 /** | 583 /** |
| 572 * Returns the text of this source. | 584 * Returns the text of this source. |
| 573 */ | 585 */ |
| 574 String get text; | 586 String get text; |
| 575 } | 587 } |
| OLD | NEW |