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 // Patch library for dart:mirrors. | 5 // Patch library for dart:mirrors. |
6 | 6 |
7 import 'dart:_js_mirrors' as js; | 7 import 'dart:_js_mirrors' as js; |
8 | 8 |
9 patch class MirrorSystem { | 9 patch class MirrorSystem { |
10 patch static String getName(Symbol symbol) => js.getName(symbol); | 10 patch static String getName(Symbol symbol) => js.getName(symbol); |
| 11 patch static Symbol getSymbol(String name, [LibraryMirror lib]) { |
| 12 throw new UnimplementedError("MirrorSystem.getSymbol not implemented"); |
| 13 } |
11 } | 14 } |
12 | 15 |
13 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem; | 16 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem; |
14 | 17 |
15 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { | 18 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { |
16 throw new UnsupportedError("MirrorSystem not implemented"); | 19 throw new UnsupportedError("MirrorSystem not implemented"); |
17 } | 20 } |
18 | 21 |
19 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee); | 22 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee); |
20 | 23 |
21 patch ClassMirror reflectClass(Type key) { | 24 patch ClassMirror reflectClass(Type key) { |
22 return js.reflectType(key).originalDeclaration; | 25 return js.reflectType(key).originalDeclaration; |
23 } | 26 } |
OLD | NEW |