| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 * Is [:true:] iff this type is a function type. | 225 * Is [:true:] iff this type is a function type. |
| 226 */ | 226 */ |
| 227 bool get isFunction; | 227 bool get isFunction; |
| 228 } | 228 } |
| 229 | 229 |
| 230 /** | 230 /** |
| 231 * A class or interface type. | 231 * A class or interface type. |
| 232 */ | 232 */ |
| 233 abstract class ClassMirror implements TypeMirror, ObjectMirror { | 233 abstract class ClassMirror implements TypeMirror, ObjectMirror { |
| 234 /** | 234 /** |
| 235 * Returns the defining type, i.e. declaration of a type. | 235 * A mirror on the original declaration of this type. |
| 236 * |
| 237 * For most classes, they are their own original declaration. For |
| 238 * generic classes, however, there is a distinction between the |
| 239 * original class declaration, which has unbound type variables, and |
| 240 * the instantiations of generic classes, which have bound type |
| 241 * variables. |
| 236 */ | 242 */ |
| 237 ClassMirror get declaration; | 243 ClassMirror get originalDeclaration; |
| 238 | 244 |
| 239 /** | 245 /** |
| 240 * Returns the super class of this type, or null if this type is [Object] or a | 246 * Returns the super class of this type, or null if this type is [Object] or a |
| 241 * typedef. | 247 * typedef. |
| 242 */ | 248 */ |
| 243 ClassMirror get superclass; | 249 ClassMirror get superclass; |
| 244 | 250 |
| 245 /** | 251 /** |
| 246 * Returns a list of the interfaces directly implemented by this type. | 252 * Returns a list of the interfaces directly implemented by this type. |
| 247 */ | 253 */ |
| 248 List<ClassMirror> get interfaces; | 254 List<ClassMirror> get superinterfaces; |
| 249 | 255 |
| 250 /** | 256 /** |
| 251 * Is [:true:] iff this type is a class. | 257 * Is [:true:] iff this type is a class. |
| 252 */ | 258 */ |
| 253 bool get isClass; | 259 bool get isClass; |
| 254 | 260 |
| 255 /** | 261 /** |
| 256 * Is [:true:] iff this type is an interface. | 262 * Is [:true:] iff this type is an interface. |
| 257 */ | 263 */ |
| 258 bool get isInterface; | 264 bool get isInterface; |
| 259 | 265 |
| 260 /** | 266 /** |
| 261 * Is [:true:] if this type is the declaration of a type. | 267 * Is this the original declaration of this type? |
| 268 * |
| 269 * For most classes, they are their own original declaration. For |
| 270 * generic classes, however, there is a distinction between the |
| 271 * original class declaration, which has unbound type variables, and |
| 272 * the instantiations of generic classes, which have bound type |
| 273 * variables. |
| 262 */ | 274 */ |
| 263 bool get isDeclaration; | 275 bool get isOriginalDeclaration; |
| 264 | 276 |
| 265 /** | 277 /** |
| 266 * Is [:true:] if this class is declared abstract. | 278 * Is [:true:] if this class is declared abstract. |
| 267 */ | 279 */ |
| 268 bool get isAbstract; | 280 bool get isAbstract; |
| 269 | 281 |
| 270 /** | 282 /** |
| 271 * Returns a list of the type arguments for this type. | 283 * Returns a list of the type arguments for this type. |
| 272 */ | 284 */ |
| 273 List<TypeMirror> get typeArguments; | 285 List<TypeMirror> get typeArguments; |
| 274 | 286 |
| 275 /** | 287 /** |
| 276 * Returns the list of type variables for this type. | 288 * Returns the list of type variables for this type. |
| 277 */ | 289 */ |
| 278 List<TypeVariableMirror> get typeVariables; | 290 List<TypeVariableMirror> get typeVariables; |
| 279 | 291 |
| 280 /** | 292 /** |
| 281 * Returns an immutable map of the constructors in this interface. | 293 * Returns an immutable map of the constructors in this interface. |
| 282 */ | 294 */ |
| 283 Map<String, MethodMirror> get constructors; | 295 Map<String, MethodMirror> get constructors; |
| 284 | 296 |
| 285 /** | 297 /** |
| 286 * Returns the default type for this interface. | 298 * Returns the default type for this interface. |
| 287 */ | 299 */ |
| 288 ClassMirror get defaultType; | 300 ClassMirror get defaultFactory; |
| 289 } | 301 } |
| 290 | 302 |
| 291 /** | 303 /** |
| 292 * A type parameter as declared on a generic type. | 304 * A type parameter as declared on a generic type. |
| 293 */ | 305 */ |
| 294 abstract class TypeVariableMirror implements TypeMirror { | 306 abstract class TypeVariableMirror implements TypeMirror { |
| 295 /** | 307 /** |
| 296 * Return a mirror on the class, interface, or typedef that declared the | 308 * Return a mirror on the class, interface, or typedef that declared the |
| 297 * type variable. | 309 * type variable. |
| 298 */ | 310 */ |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 /** | 534 /** |
| 523 * Returns the URI where the source originated. | 535 * Returns the URI where the source originated. |
| 524 */ | 536 */ |
| 525 Uri get uri; | 537 Uri get uri; |
| 526 | 538 |
| 527 /** | 539 /** |
| 528 * Returns the text of this source. | 540 * Returns the text of this source. |
| 529 */ | 541 */ |
| 530 String get text; | 542 String get text; |
| 531 } | 543 } |
| OLD | NEW |