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 import "dart:nativewrappers"; |
| 6 |
5 /** | 7 /** |
6 * Returns a [MirrorSystem] for the current isolate. | 8 * Returns a [MirrorSystem] for the current isolate. |
7 */ | 9 */ |
8 patch MirrorSystem currentMirrorSystem() { | 10 patch MirrorSystem currentMirrorSystem() { |
9 return _Mirrors.currentMirrorSystem(); | 11 return _Mirrors.currentMirrorSystem(); |
10 } | 12 } |
11 | 13 |
12 /** | 14 /** |
13 * Creates a [MirrorSystem] for the isolate which is listening on | 15 * Creates a [MirrorSystem] for the isolate which is listening on |
14 * the [SendPort]. | 16 * the [SendPort]. |
15 */ | 17 */ |
16 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { | 18 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { |
17 return _Mirrors.mirrorSystemOf(port); | 19 return _Mirrors.mirrorSystemOf(port); |
18 } | 20 } |
19 | 21 |
20 /** | 22 /** |
21 * Returns an [InstanceMirror] for some Dart language object. | 23 * Returns an [InstanceMirror] for some Dart language object. |
22 * | 24 * |
23 * This only works if this mirror system is associated with the | 25 * This only works if this mirror system is associated with the |
24 * current running isolate. | 26 * current running isolate. |
25 */ | 27 */ |
26 patch InstanceMirror reflect(Object reflectee) { | 28 patch InstanceMirror reflect(Object reflectee) { |
27 return _Mirrors.reflect(reflectee); | 29 return _Mirrors.reflect(reflectee); |
28 } | 30 } |
OLD | NEW |