| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 */ | 108 */ |
| 109 SourceLocation get location; | 109 SourceLocation get location; |
| 110 | 110 |
| 111 /** | 111 /** |
| 112 * A mirror on the owner of this function. This is the declaration immediately | 112 * A mirror on the owner of this function. This is the declaration immediately |
| 113 * surrounding the reflectee. | 113 * surrounding the reflectee. |
| 114 * | 114 * |
| 115 * Note that for libraries, the owner will be [:null:]. | 115 * Note that for libraries, the owner will be [:null:]. |
| 116 */ | 116 */ |
| 117 DeclarationMirror get owner; | 117 DeclarationMirror get owner; |
| 118 |
| 119 /** |
| 120 * Is this declaration private? |
| 121 * |
| 122 * Note that for libraries, this will be [:false:]. |
| 123 */ |
| 124 bool get isPrivate; |
| 125 |
| 126 /** |
| 127 * Is this declaration top-level? |
| 128 * |
| 129 * This is defined to be equivalent to: |
| 130 * [:mirror.owner != null && mirror.owner is LibraryMirror:] |
| 131 */ |
| 132 bool get isTopLevel; |
| 118 } | 133 } |
| 119 | 134 |
| 120 /** | 135 /** |
| 121 * Common interface for interface types and libraries. | 136 * Common interface for interface types and libraries. |
| 122 */ | 137 */ |
| 123 abstract class ObjectMirror implements Mirror { | 138 abstract class ObjectMirror implements Mirror { |
| 124 | 139 |
| 125 /** | 140 /** |
| 126 * Returns an unmodifiable map of the members of declared in this type or | 141 * Returns an unmodifiable map of the members of declared in this type or |
| 127 * library. | 142 * library. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 * Is [:true:] iff this type is a class. | 228 * Is [:true:] iff this type is a class. |
| 214 */ | 229 */ |
| 215 bool get isClass; | 230 bool get isClass; |
| 216 | 231 |
| 217 /** | 232 /** |
| 218 * Is [:true:] iff this type is an interface. | 233 * Is [:true:] iff this type is an interface. |
| 219 */ | 234 */ |
| 220 bool get isInterface; | 235 bool get isInterface; |
| 221 | 236 |
| 222 /** | 237 /** |
| 223 * Is [:true:] if this type is private. | |
| 224 */ | |
| 225 bool get isPrivate; | |
| 226 | |
| 227 /** | |
| 228 * Is [:true:] if this type is the declaration of a type. | 238 * Is [:true:] if this type is the declaration of a type. |
| 229 */ | 239 */ |
| 230 bool get isDeclaration; | 240 bool get isDeclaration; |
| 231 | 241 |
| 232 /** | 242 /** |
| 233 * Is [:true:] if this class is declared abstract. | 243 * Is [:true:] if this class is declared abstract. |
| 234 */ | 244 */ |
| 235 bool get isAbstract; | 245 bool get isAbstract; |
| 236 | 246 |
| 237 /** | 247 /** |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 * Returns true if this member is a field. | 334 * Returns true if this member is a field. |
| 325 */ | 335 */ |
| 326 bool get isField; | 336 bool get isField; |
| 327 | 337 |
| 328 /** | 338 /** |
| 329 * Returns true if this member is a method. | 339 * Returns true if this member is a method. |
| 330 */ | 340 */ |
| 331 bool get isMethod; | 341 bool get isMethod; |
| 332 | 342 |
| 333 /** | 343 /** |
| 334 * Returns true if this member is private. | |
| 335 */ | |
| 336 bool get isPrivate; | |
| 337 | |
| 338 /** | |
| 339 * Returns true if this member is static. | 344 * Returns true if this member is static. |
| 340 */ | 345 */ |
| 341 bool get isStatic; | 346 bool get isStatic; |
| 342 } | 347 } |
| 343 | 348 |
| 344 /** | 349 /** |
| 345 * A field. | 350 * A field. |
| 346 */ | 351 */ |
| 347 abstract class FieldMirror implements MemberMirror { | 352 abstract class FieldMirror implements MemberMirror { |
| 348 | 353 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 /** | 499 /** |
| 495 * Returns the URI where the source originated. | 500 * Returns the URI where the source originated. |
| 496 */ | 501 */ |
| 497 Uri get uri; | 502 Uri get uri; |
| 498 | 503 |
| 499 /** | 504 /** |
| 500 * Returns the text of this source. | 505 * Returns the text of this source. |
| 501 */ | 506 */ |
| 502 String get text; | 507 String get text; |
| 503 } | 508 } |
| OLD | NEW |