title: Generic duplication method
body: <p>I've had difficulty in the class finding much on introspection in Swift, so I'm out of ideas on this one. I currently have several classes that I want to be able to create clones of. Currently, I am having to write a lot of extra code for each class to have a unique duplication method.</p>
  
  <p>Any advice out there on using generics and introspection to write a generic duplication method that I can just use for all classes I want to be cloneable?</p>
  
  <p>To clarify further, <a href="https://www.hackingwithswift.com/example-code/system/how-to-copy-objects-in-swift-using-copy" rel="nofollow noreferrer">this</a> is essentially what I am currently doing - although I wasn't aware of the NSCopying protocol and instead made my own. I am hoping to avoid the need to pass all of the properties across to the new instance, however, and instead solve it using generics and introspection.</p>