/** * Return a MultiRootFileSet that has the same basedirs and same patternsets * as this one. * @return the cloned MultiRootFileSet. */ @Override public Object clone() { if (isReference()) { return getRef(getProject()).clone(); } final MultiRootFileSet fs = (MultiRootFileSet) super.clone(); fs.baseDirs = new ArrayList<>(baseDirs); fs.union = null; return fs; }
/** * Creates a deep clone of this instance, except for the nested * selectors (the list of selectors is a shallow clone of this * instance's list). * @return the cloned object * @since Ant 1.6 */ @Override public synchronized Object clone() { if (isReference()) { return (getRef(getProject())).clone(); } try { AbstractFileSet fs = (AbstractFileSet) super.clone(); fs.defaultPatterns = (PatternSet) defaultPatterns.clone(); fs.additionalPatterns = additionalPatterns.stream().map(PatternSet::clone) .map(PatternSet.class::cast).collect(Collectors.toList()); fs.selectors = new ArrayList<>(selectors); return fs; } catch (CloneNotSupportedException e) { throw new BuildException(e); } }
/** * Return a TarFileSet that has the same properties * as this one. * @return the cloned tarFileSet */ @Override public Object clone() { if (isReference()) { return getRef(getProject()).clone(); } return super.clone(); }
/** * Return a ZipFileSet that has the same properties * as this one. * @return the cloned zipFileSet */ @Override public Object clone() { if (isReference()) { return getRef(getProject()).clone(); } return super.clone(); }
/** * Return a ArchiveFileSet that has the same properties * as this one. * * @return the cloned archiveFileSet */ public Object clone() { if (isReference()) { return getRef(getProject()).clone(); } return super.clone(); }
/** * Return a ArchiveFileSet that has the same properties * as this one. * * @return the cloned archiveFileSet */ public Object clone() { if (isReference()) { return getRef(getProject()).clone(); } return super.clone(); }