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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 * library. | 142 * library. |
143 */ | 143 */ |
144 Map<String, MemberMirror> get declaredMembers; | 144 Map<String, MemberMirror> get declaredMembers; |
145 } | 145 } |
146 | 146 |
147 /** | 147 /** |
148 * A library. | 148 * A library. |
149 */ | 149 */ |
150 abstract class LibraryMirror implements ObjectMirror, DeclarationMirror { | 150 abstract class LibraryMirror implements ObjectMirror, DeclarationMirror { |
151 /** | 151 /** |
152 * The name of the library, as given in #library(). | 152 * An immutable map from from names to mirrors for all members in |
| 153 * this library. |
| 154 * |
| 155 * The members of a library are its top-level classes, |
| 156 * functions, variables, getters, and setters. |
153 */ | 157 */ |
154 String get simpleName; | 158 Map<String, Mirror> get members; |
155 | 159 |
156 /** | 160 /** |
157 * Returns an iterable over all types in the library. | 161 * An immutable map from names to mirrors for all class |
| 162 * declarations in this library. |
158 */ | 163 */ |
159 Map<String, ClassMirror> get types; | 164 Map<String, ClassMirror> get classes; |
| 165 |
| 166 /** |
| 167 * An immutable map from names to mirrors for all function, getter, |
| 168 * and setter declarations in this library. |
| 169 */ |
| 170 Map<String, MethodMirror> get functions; |
| 171 |
| 172 /** |
| 173 * An immutable map from names to mirrors for all getter |
| 174 * declarations in this library. |
| 175 */ |
| 176 Map<String, MethodMirror> get getters; |
| 177 |
| 178 /** |
| 179 * An immutable map from names to mirrors for all setter |
| 180 * declarations in this library. |
| 181 */ |
| 182 Map<String, MethodMirror> get setters; |
160 | 183 |
161 /** | 184 /** |
162 * Returns the canonical URI for this library. | 185 * Returns the canonical URI for this library. |
163 */ | 186 */ |
164 Uri get uri; | 187 Uri get uri; |
165 } | 188 } |
166 | 189 |
167 /** | 190 /** |
168 * Common interface for classes, interfaces, typedefs and type variables. | 191 * Common interface for classes, interfaces, typedefs and type variables. |
169 */ | 192 */ |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 /** | 522 /** |
500 * Returns the URI where the source originated. | 523 * Returns the URI where the source originated. |
501 */ | 524 */ |
502 Uri get uri; | 525 Uri get uri; |
503 | 526 |
504 /** | 527 /** |
505 * Returns the text of this source. | 528 * Returns the text of this source. |
506 */ | 529 */ |
507 String get text; | 530 String get text; |
508 } | 531 } |
OLD | NEW |