How to get the parameterized type of an instance with Dart and smoke? -
consider code:
class foo { list<string> listofstrings; } using smoke package, how can string looking @ listofstrings ?
i see can declaration type, don't see how parameterized type declaration.
this important for, among other things, building serialization library.
that's not possible in smoke.
it might not possible mirrors api directly either. example:
import 'dart:mirrors'; class b<t> {} class { static b<int> b = new b<int>(); } main() { var x = reflecttype(a); print(x); print(x.declarations[#b].type); } will print b, not b<int>.
Comments
Post a Comment