| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 * Returns the name of this entity qualified by is enclosing context. For | 100 * Returns the name of this entity qualified by is enclosing context. For |
| 101 * instance, the qualified name of a method 'method' in class 'Class' in | 101 * instance, the qualified name of a method 'method' in class 'Class' in |
| 102 * library 'library' is 'library.Class.method'. | 102 * library 'library' is 'library.Class.method'. |
| 103 */ | 103 */ |
| 104 String get qualifiedName; | 104 String get qualifiedName; |
| 105 | 105 |
| 106 /** | 106 /** |
| 107 * The source location of this Dart language entity. | 107 * The source location of this Dart language entity. |
| 108 */ | 108 */ |
| 109 SourceLocation get location; | 109 SourceLocation get location; |
| 110 |
| 111 /** |
| 112 * A mirror on the owner of this function. This is the declaration immediately |
| 113 * surrounding the reflectee. |
| 114 * |
| 115 * Note that for libraries, the owner will be [:null:]. |
| 116 */ |
| 117 DeclarationMirror get owner; |
| 110 } | 118 } |
| 111 | 119 |
| 112 /** | 120 /** |
| 113 * Common interface for interface types and libraries. | 121 * Common interface for interface types and libraries. |
| 114 */ | 122 */ |
| 115 abstract class ObjectMirror implements Mirror { | 123 abstract class ObjectMirror implements Mirror { |
| 116 | 124 |
| 117 /** | 125 /** |
| 118 * Returns an unmodifiable map of the members of declared in this type or | 126 * Returns an unmodifiable map of the members of declared in this type or |
| 119 * library. | 127 * library. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 * for a [:typedef void f(int):]. | 303 * for a [:typedef void f(int):]. |
| 296 */ | 304 */ |
| 297 TypeMirror get definition; | 305 TypeMirror get definition; |
| 298 } | 306 } |
| 299 | 307 |
| 300 /** | 308 /** |
| 301 * A member of a type, i.e. a field, method or constructor. | 309 * A member of a type, i.e. a field, method or constructor. |
| 302 */ | 310 */ |
| 303 abstract class MemberMirror implements DeclarationMirror { | 311 abstract class MemberMirror implements DeclarationMirror { |
| 304 /** | 312 /** |
| 305 * Returns a mirror on the declaration immediately surrounding the reflectee. | |
| 306 * This could be a class, interface, library or another method or function. | |
| 307 */ | |
| 308 ObjectMirror get surroundingDeclaration; | |
| 309 | |
| 310 /** | |
| 311 * Returns true if this is a top level member, i.e. a member not within a | 313 * Returns true if this is a top level member, i.e. a member not within a |
| 312 * type. | 314 * type. |
| 313 */ | 315 */ |
| 314 bool get isTopLevel; | 316 bool get isTopLevel; |
| 315 | 317 |
| 316 /** | 318 /** |
| 317 * Returns true if this member is a constructor. | 319 * Returns true if this member is a constructor. |
| 318 */ | 320 */ |
| 319 bool get isConstructor; | 321 bool get isConstructor; |
| 320 | 322 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 /** | 494 /** |
| 493 * Returns the URI where the source originated. | 495 * Returns the URI where the source originated. |
| 494 */ | 496 */ |
| 495 Uri get uri; | 497 Uri get uri; |
| 496 | 498 |
| 497 /** | 499 /** |
| 498 * Returns the text of this source. | 500 * Returns the text of this source. |
| 499 */ | 501 */ |
| 500 String get text; | 502 String get text; |
| 501 } | 503 } |
| OLD | NEW |