/** * Clone a component description. */ public Object clone() { try { DFComponentDescription ret = (DFComponentDescription)super.clone(); ret.services = new ArrayList(); ret.protocols = (List)((ArrayList)protocols).clone(); ret.languages = (List)((ArrayList)languages).clone(); ret.ontologies = (List)((ArrayList)ontologies).clone(); for(int i = 0; i < services.size(); i++) { ret.services.add(((DFServiceDescription)services.get(i)).clone()); } return ret; } catch(CloneNotSupportedException e) { throw new RuntimeException("Cannot clone: " + this); } }
/** * Clone a component description. */ public Object clone() { try { DFComponentDescription ret = (DFComponentDescription)super.clone(); ret.services = new ArrayList(); ret.protocols = (List)((ArrayList)protocols).clone(); ret.languages = (List)((ArrayList)languages).clone(); ret.ontologies = (List)((ArrayList)ontologies).clone(); for(int i = 0; i < services.size(); i++) { ret.services.add(((DFServiceDescription)services.get(i)).clone()); } return ret; } catch(CloneNotSupportedException e) { throw new RuntimeException("Cannot clone: " + this); } }