2015-10-13 03:29:13 -04:00
|
|
|
library testing.lang_utils;
|
2015-05-12 10:28:57 -04:00
|
|
|
|
2015-03-30 10:37:33 -04:00
|
|
|
import 'dart:mirrors';
|
|
|
|
|
|
|
|
Type getTypeOf(instance) => instance.runtimeType;
|
|
|
|
|
|
|
|
dynamic instantiateType(Type type, [List params = const []]) {
|
|
|
|
var cm = reflectClass(type);
|
|
|
|
return cm.newInstance(new Symbol(''), params).reflectee;
|
|
|
|
}
|