/** * Creates and returns a deep copy of this object. * * @return a clone of this instance. */ public Object clone() { try { final Dependencies ret = (Dependencies) super.clone(); final Dependency[] deps = this.getDependencies(); final Dependency[] cloned = new Dependency[ deps.length ]; for ( int i = deps.length - 1; i >= 0; i-- ) { cloned[i] = (Dependency) deps[i].clone(); } ret.setDependencies( cloned ); return ret; } catch ( final CloneNotSupportedException e ) { throw new AssertionError( e ); } }