Introspection/Reflection/etc on Linux
Jacob Carlborg
doob at me.com
Wed Oct 19 23:36:54 PDT 2011
On 2011-10-20 07:44, J Arrizza wrote:
> Yup, didn't check for null, damn it. Can I blame it on working on it at
> 2:30AM? Forget the excuse, I just didn't check for null.
>
> For future reference, the fully qualified name for SomeClass is
> "SomeClass.SomeClass". If I create class Bob in the SomeClass file
> "SomeClass.Bob". The first node is the file name, the second the actual
> name of the class. I imagine there is additional complications for
> nested classes.
The fully qualified class name includes the module the class is defined
in, if you're unsure you can get it by running:
writeln(SomeClass.classinfo.name);
> Thanks Jacob,
> John
>
>
> For Object.factory you need the fully qualified name, i.e.
> SomeClass.classinfo.name <http://SomeClass.classinfo.name>. If
> Object.factory can't find a class name it will just return null.
>
> --
> /Jacob Carlborg
>
>
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list