December 03, 2006 reflection: instantiation of objects via class names at runtime | ||||
---|---|---|---|---|
| ||||
Attachments:
| The attached code allows the instantiation of objects at runtime requiring only the fully qualified class name. sample: # # import cn.kuehne.reflection; # ... # Object o = new_Instance("std.stream.File"); # limitations: 1) Windows isn't yet supported. 2) The class has to have an explicit "this()" constructor. compilation: 1) gcc -m32 -c elf.c 2) dmd -c reflection.d 3) dmd <what ever> elf.o reflection.o Thomas |
December 04, 2006 Re: reflection: instantiation of objects via class names at runtime | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kühne | Awesome! |
Copyright © 1999-2021 by the D Language Foundation