Runtime icon indicating copy to clipboard operation
Runtime copied to clipboard

how to get class/struct by name?

Open uiiang opened this issue 5 years ago • 3 comments

how to get class/struct by name string?

struct Person{}

let info = typeInfo(of:"Person")

uiiang avatar Dec 03 '20 10:12 uiiang

Unfortunately this is not possible. If I recall correctly it may be possible to get the type/type info from the mangled name, but not just the name itself.

wickwirew avatar Dec 03 '20 14:12 wickwirew

@wickwirew Does the library support getting a type, and then type info by mangled name?

edudnyk avatar Oct 03 '21 14:10 edudnyk

@edudnyk unfortunately it does not

wickwirew avatar Oct 04 '21 14:10 wickwirew