Top.Mail.Ru
February 16th, 2006 - Java developers — LiveJournal
? ?

Java developers

February 16th, 2006
Image

10:17 pm - Imagesilnith - How deeply have you contemplated the subtleties of cloning?

Cloning is a commonly known and selectively used tool for a variety of purposes. Most people believe it is simple and straightforward. But it is a sensitive issue that few truly understand, far fewer than engage in it.Collapse ) In summary, cloning is an activity that should only be entered into with careful thought, reflection, and a thorough understanding of the subtle issues involved. I skipped over the times it is appropriate to return a different type from that being cloned, and how one can break the clonable chain by making use of the throws CloneNotSupportedException escape hatch built into the method contract. I figure anyone making use of those techniques has already contemplated and understood these issues, this is for people new to cloning or the language in general.
Powered by LiveJournal.com
Image