/** * Sets whether default exclusions should be used or not. * * @param useDefaultExcludes <code>boolean</code>. */ public synchronized void setDefaultexcludes(boolean useDefaultExcludes) { if (isReference()) { throw tooManyAttributes(); } this.useDefaultExcludes = useDefaultExcludes; directoryScanner = null; }
/** * Sets case sensitivity of the file system. * * @param caseSensitive <code>boolean</code>. */ public synchronized void setCaseSensitive(boolean caseSensitive) { if (isReference()) { throw tooManyAttributes(); } this.caseSensitive = caseSensitive; directoryScanner = null; }
/** * Sets whether or not symbolic links should be followed. * * @param followSymlinks whether or not symbolic links should be followed. */ public synchronized void setFollowSymlinks(boolean followSymlinks) { if (isReference()) { throw tooManyAttributes(); } this.followSymlinks = followSymlinks; directoryScanner = null; }
/** * Sets the <code>File</code> containing the includes patterns. * * @param incl <code>File</code> instance. * @throws BuildException on error */ public synchronized void setIncludesfile(File incl) throws BuildException { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setIncludesfile(incl); directoryScanner = null; }
/** * Sets the <code>File</code> containing the excludes patterns. * * @param excl <code>File</code> instance. * @throws BuildException on error */ public synchronized void setExcludesfile(File excl) throws BuildException { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setExcludesfile(excl); directoryScanner = null; }
/** * Appends <code>excludes</code> to the current list of exclude * patterns. * * <p>Patterns may be separated by a comma or a space.</p> * * @param excludes the <code>String</code> containing the exclude patterns. */ public synchronized void setExcludes(String excludes) { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setExcludes(excludes); directoryScanner = null; }
/** * Appends <code>includes</code> to the current list of include * patterns. * * <p>Patterns may be separated by a comma or a space.</p> * * @param includes the <code>String</code> containing the include patterns. */ public synchronized void setIncludes(String includes) { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setIncludes(includes); directoryScanner = null; }
/** * Sets the base-directory for this instance. * @param dir the directory's <code>File</code> instance. * @throws BuildException on error */ public synchronized void setDir(File dir) throws BuildException { if (isReference()) { throw tooManyAttributes(); } if (fileAttributeUsed && !getDir().equals(dir)) { throw dirAndFileAreMutuallyExclusive(); } this.dir = dir; directoryScanner = null; }
/** * Appends <code>includes</code> to the current list of include * patterns. * * @param includes array containing the include patterns. * @since Ant 1.7 */ public synchronized void appendIncludes(String[] includes) { if (isReference()) { throw tooManyAttributes(); } if (includes != null) { for (String include : includes) { defaultPatterns.createInclude().setName(include); } directoryScanner = null; } }
/** * Appends <code>excludes</code> to the current list of exclude * patterns. * * @param excludes array containing the exclude patterns. * @since Ant 1.7 */ public synchronized void appendExcludes(String[] excludes) { if (isReference()) { throw tooManyAttributes(); } if (excludes != null) { for (String exclude : excludes) { defaultPatterns.createExclude().setName(exclude); } directoryScanner = null; } }
/** * Makes this instance in effect a reference to another instance. * * <p>You must not set another attribute or nest elements inside * this element if you make it a reference.</p> * @param r the <code>Reference</code> to use. * @throws BuildException on error */ @Override public void setRefid(Reference r) throws BuildException { if (dir != null || defaultPatterns.hasPatterns(getProject())) { throw tooManyAttributes(); } if (!additionalPatterns.isEmpty()) { throw noChildrenAllowed(); } if (!selectors.isEmpty()) { throw noChildrenAllowed(); } super.setRefid(r); }
/** * Creates a single file fileset. * @param file the single <code>File</code> included in this * <code>AbstractFileSet</code>. */ public synchronized void setFile(File file) { if (isReference()) { throw tooManyAttributes(); } if (fileAttributeUsed) { if (getDir().equals(file.getParentFile())) { String[] includes = defaultPatterns.getIncludePatterns(getProject()); if (includes.length == 1 && includes[0].equals(file.getName())) { // NOOP, setFile has been invoked twice with the same parameter return; } } throw new BuildException("setFile cannot be called twice with different arguments"); } else if (getDir() != null) { throw dirAndFileAreMutuallyExclusive(); } setDir(file.getParentFile()); fileAttributeUsed = true; createInclude().setName(file.getName()); }