/** * Method clone. * * @return Dependency */ public Dependency clone() { try { Dependency copy = (Dependency) super.clone(); if ( this.exclusions != null ) { copy.exclusions = new java.util.ArrayList<Exclusion>(); for ( Exclusion item : this.exclusions ) { copy.exclusions.add( ( (Exclusion) item).clone() ); } } if ( copy.locations != null ) { copy.locations = new java.util.LinkedHashMap( copy.locations ); } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Dependency clone()
@Override protected void mergeDependency_Exclusions( Dependency target, Dependency source, boolean sourceDominant, Map<Object, Object> context ) { List<Exclusion> tgt = target.getExclusions(); if ( tgt.isEmpty() ) { List<Exclusion> src = source.getExclusions(); for ( Exclusion element : src ) { Exclusion clone = element.clone(); target.addExclusion( clone ); } } }
/** * Method clone. * * @return Dependency */ public Dependency clone() { try { Dependency copy = (Dependency) super.clone(); if ( this.exclusions != null ) { copy.exclusions = new java.util.ArrayList<Exclusion>(); for ( Exclusion item : this.exclusions ) { copy.exclusions.add( ( (Exclusion) item).clone() ); } } if ( copy.locations != null ) { copy.locations = new java.util.LinkedHashMap( copy.locations ); } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Dependency clone()
@Override protected void mergeDependency_Exclusions( Dependency target, Dependency source, boolean sourceDominant, Map<Object, Object> context ) { List<Exclusion> tgt = target.getExclusions(); if ( tgt.isEmpty() ) { List<Exclusion> src = source.getExclusions(); for ( Exclusion element : src ) { Exclusion clone = element.clone(); target.addExclusion( clone ); } } }