/** * Clone a component description. */ public Object clone() { try { CMSComponentDescription ret = (CMSComponentDescription)super.clone(); if(name!=null) ret.setName((ComponentIdentifier)((ComponentIdentifier)name).clone()); if(children!=null) { ret.children = new LinkedHashSet(); ret.children.addAll(children); } ret.cause = cause!=null ? new Cause(cause) : cause; return ret; } catch(CloneNotSupportedException e) { throw new RuntimeException("Cannot clone: " + this); } }