| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The main interface for the whole mirror system. | 52 * The main interface for the whole mirror system. |
| 53 */ | 53 */ |
| 54 abstract class MirrorSystem { | 54 abstract class MirrorSystem { |
| 55 /** | 55 /** |
| 56 * Returns an unmodifiable map of all libraries in this mirror system. | 56 * Returns an unmodifiable map of all libraries in this mirror system. |
| 57 */ | 57 */ |
| 58 Map<String, LibraryMirror> get libraries; | 58 Map<String, LibraryMirror> get libraries; |
| 59 |
| 60 /** |
| 61 * A mirror on the [:dynamic:] type. |
| 62 */ |
| 63 TypeMirror get dynamicType; |
| 64 |
| 65 /** |
| 66 * A mirror on the [:void:] type. |
| 67 */ |
| 68 TypeMirror get voidType; |
| 59 } | 69 } |
| 60 | 70 |
| 61 | 71 |
| 62 /** | 72 /** |
| 63 * An entity in the mirror system. | 73 * An entity in the mirror system. |
| 64 */ | 74 */ |
| 65 abstract class Mirror { | 75 abstract class Mirror { |
| 66 static const String UNARY_MINUS = 'unary-'; | 76 static const String UNARY_MINUS = 'unary-'; |
| 67 | 77 |
| 68 /** | 78 /** |
| 69 * Returns the mirror system which contains this mirror. | 79 * Returns the mirror system which contains this mirror. |
| 70 */ | 80 */ |
| 71 MirrorSystem get system; | 81 MirrorSystem get mirrors; |
| 72 } | 82 } |
| 73 | 83 |
| 74 abstract class DeclarationMirror implements Mirror { | 84 abstract class DeclarationMirror implements Mirror { |
| 75 /** | 85 /** |
| 76 * The simple name of the entity. The simple name is unique within the | 86 * The simple name of the entity. The simple name is unique within the |
| 77 * scope of the entity declaration. | 87 * scope of the entity declaration. |
| 78 * | 88 * |
| 79 * The simple name is in most cases the declared single identifier name of | 89 * The simple name is in most cases the declared single identifier name of |
| 80 * the entity, such as 'method' for a method [:void method() {...}:]. For an | 90 * the entity, such as 'method' for a method [:void method() {...}:]. For an |
| 81 * unnamed constructor for [:class Foo:] the simple name is 'Foo'. For a | 91 * unnamed constructor for [:class Foo:] the simple name is 'Foo'. For a |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 * Returns the library in which this member resides. | 211 * Returns the library in which this member resides. |
| 202 */ | 212 */ |
| 203 LibraryMirror get library; | 213 LibraryMirror get library; |
| 204 | 214 |
| 205 /** | 215 /** |
| 206 * Is [:true:] iff this type is the [:Object:] type. | 216 * Is [:true:] iff this type is the [:Object:] type. |
| 207 */ | 217 */ |
| 208 bool get isObject; | 218 bool get isObject; |
| 209 | 219 |
| 210 /** | 220 /** |
| 211 * Is [:true:] iff this type is the [:Dynamic:] type. | 221 * Is [:true:] iff this type is the [:dynamic:] type. |
| 212 */ | 222 */ |
| 213 bool get isDynamic; | 223 bool get isDynamic; |
| 214 | 224 |
| 215 /** | 225 /** |
| 216 * Is [:true:] iff this type is the void type. | 226 * Is [:true:] iff this type is the void type. |
| 217 */ | 227 */ |
| 218 bool get isVoid; | 228 bool get isVoid; |
| 219 | 229 |
| 220 /** | 230 /** |
| 221 * Is [:true:] iff this type is a type variable. | 231 * Is [:true:] iff this type is a type variable. |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 /** | 579 /** |
| 570 * Returns the URI where the source originated. | 580 * Returns the URI where the source originated. |
| 571 */ | 581 */ |
| 572 Uri get uri; | 582 Uri get uri; |
| 573 | 583 |
| 574 /** | 584 /** |
| 575 * Returns the text of this source. | 585 * Returns the text of this source. |
| 576 */ | 586 */ |
| 577 String get text; | 587 String get text; |
| 578 } | 588 } |
| OLD | NEW |