/** * Constructor that inverts the meaning of its argument. * @param other the selector to invert * @since Ant 1.7 */ public NotSelector(FileSelector other) { this(); appendSelector(other); }
/** * Makes sure that there is only one entry, sets an error message if * not. */ public void verifySettings() { if (selectorCount() != 1) { setError( "One and only one selector is allowed within the <not> tag"); } }
private void addExcludes(final FileSet fs) { if (excludes != null ) { final NotSelector fsExcludes = new NotSelector(); for (final String exc : excludes) { final FilenameSelector fns = new FilenameSelector(); fns.setName(exc); fsExcludes.add(fns); } fs.addNot(fsExcludes); } }
/** * @return a string representation of the selector */ public String toString() { StringBuilder buf = new StringBuilder(); if (hasSelectors()) { buf.append("{notselect: "); buf.append(super.toString()); buf.append("}"); } return buf.toString(); }