mirror of
https://github.com/angular/angular.git
synced 2026-11-23 15:07:51 -05:00
11 lines
259 B
Dart
11 lines
259 B
Dart
library testing.lang_utils;
|
|
|
|
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;
|
|
}
|