Chromium Code Reviews| 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"; | 5 import "dart:nativewrappers"; |
| 6 // TODO(ahe): Move _symbol_dev.Symbol to its own "private" library? | 6 // TODO(ahe): Move _symbol_dev.Symbol to its own "private" library? |
| 7 import "dart:_collection-dev" as _symbol_dev; | 7 import "dart:_collection-dev" as _symbol_dev; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Returns a [MirrorSystem] for the current isolate. | 10 * Returns a [MirrorSystem] for the current isolate. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 /** | 24 /** |
| 25 * Returns an [InstanceMirror] for some Dart language object. | 25 * Returns an [InstanceMirror] for some Dart language object. |
| 26 * | 26 * |
| 27 * This only works if this mirror system is associated with the | 27 * This only works if this mirror system is associated with the |
| 28 * current running isolate. | 28 * current running isolate. |
| 29 */ | 29 */ |
| 30 patch InstanceMirror reflect(Object reflectee) { | 30 patch InstanceMirror reflect(Object reflectee) { |
| 31 return _Mirrors.reflect(reflectee); | 31 return _Mirrors.reflect(reflectee); |
| 32 } | 32 } |
| 33 | 33 |
| 34 /** | |
| 35 * Returns a [ClassMirror] for the class represented by a Dart | |
| 36 * Type object. | |
| 37 * | |
| 38 * This only works with objects local to the current isolate. | |
| 39 */ | |
| 40 patch ClassMirror reflectClass(Type key) { | |
|
ahe
2013/04/17 10:40:17
I'd call the argument "type".
| |
| 41 return _Mirrors.reflectClass(key); | |
| 42 } | |
| 43 | |
| 34 patch class MirrorSystem { | 44 patch class MirrorSystem { |
| 35 /* patch */ static String getName(Symbol symbol) { | 45 /* patch */ static String getName(Symbol symbol) { |
| 36 return _symbol_dev.Symbol.getName(symbol); | 46 return _symbol_dev.Symbol.getName(symbol); |
| 37 } | 47 } |
| 38 } | 48 } |
| OLD | NEW |