How to programmatically get all the method names of an interface

Ali Çehreli acehreli at yahoo.com
Fri Feb 25 23:28:21 UTC 2022


On 2/25/22 14:05, mw wrote:
> How to programmatically get all the method names of an interface; 
> actually I want a flattened view, i.e also includes all the methods from 
> its (many) ancestors, the whole inheritance lattice.

Perhaps allMembers?

   https://dlang.org/spec/traits.html#allMembers

The following are the two that help with most such needs:

- __traits (the page above)

- The std.traits module:

   https://dlang.org/phobos/std_traits.html

Ali


More information about the Digitalmars-d-learn mailing list