2014-11-20 12:07:48 -08:00
|
|
|
library reflection.reflection;
|
|
|
|
|
|
|
|
|
|
import 'reflector.dart';
|
|
|
|
|
import 'types.dart';
|
|
|
|
|
export 'reflector.dart';
|
2015-02-02 16:25:34 -08:00
|
|
|
import 'package:facade/src/lang.dart';
|
2014-11-20 12:07:48 -08:00
|
|
|
|
|
|
|
|
class NoReflectionCapabilities {
|
|
|
|
|
Function factory(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)}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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}";
|
2014-11-20 12:07:48 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MethodFn method(String name) {
|
|
|
|
|
throw "Cannot find method ${name}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final Reflector reflector = new Reflector(new NoReflectionCapabilities());
|