It may be done with objc/runtime.h. look the original objc source file. You may find something. https://github.com/opensource-apple/objc4/blob/master/runtime/objc-class.mm
– ManiApr 19 '18 at 12:34
Possible duplicate of [Swift nested class properties](https://stackoverflow.com/questions/26806932/swift-nested-class-properties)
– Martin RApr 19 '18 at 12:38