Example: class Bob { static void print () { write("str"); } } string name = "Bob"; __traits(getMember, Types.getType(name), "print")(); How can you implement "Types.getType(name)"? I do not know in advance what can be the class names.