Files
Angular-Docs-Cn/modules/angular2/src/core/reflection/reflection.dart
T

52 lines
1.2 KiB
Dart
Raw Normal View History

library reflection.reflection;
import 'reflector.dart';
import 'types.dart';
export 'reflector.dart';
import 'platform_reflection_capabilities.dart';
2015-08-20 14:28:25 -07:00
import 'package:angular2/src/core/facade/lang.dart';
class NoReflectionCapabilities implements PlatformReflectionCapabilities {
bool isReflectionEnabled() {
return false;
}
Function factory(Type type) {
throw "Cannot find reflection information on ${stringify(type)}";
}
List interfaces(Type type) {
throw "Cannot find reflection information on ${stringify(type)}";
}
List parameters(Type type) {
throw "Cannot find reflection information on ${stringify(type)}";
}
List annotations(Type type) {
throw "Cannot find reflection information on ${stringify(type)}";
}
Map propMetadata(Type type) {
throw "Cannot find reflection information on ${stringify(type)}";
}
GetterFn getter(String name) {
throw "Cannot find getter ${name}";
}
SetterFn setter(String name) {
2014-11-24 18:02:21 -08:00
throw "Cannot find setter ${name}";
}
MethodFn method(String name) {
throw "Cannot find method ${name}";
}
String importUri(Type type) => './';
2015-09-14 15:59:09 -07:00
String moduleId(Type type) => null;
}
final Reflector reflector = new Reflector(new NoReflectionCapabilities());