public class PatternSet extends Object implements AntBuilderAware, PatternFilterable
PatternFilterable.| Constructor and Description |
|---|
PatternSet() |
public PatternSet copyFrom(PatternFilterable sourcePattern)
protected PatternSet doCopyFrom(PatternSet from)
public PatternSet intersect()
public Spec<FileTreeElement> getAsSpec()
public Spec<FileTreeElement> getAsIncludeSpec()
public Spec<FileTreeElement> getAsExcludeSpec()
public Set<String> getIncludes()
PatternFilterablegetIncludes in interface PatternFilterablepublic Set<Spec<FileTreeElement>> getIncludeSpecs()
public PatternSet setIncludes(Iterable<String> includes)
PatternFilterablePatternFilterable.include(Iterable) this replaces any previously
defined includes.setIncludes in interface PatternFilterableincludes - an Iterable providing new include patternsPattern Formatpublic PatternSet include(String... includes)
PatternFilterableinclude in interface PatternFilterableincludes - a vararg list of include patternsPattern Formatpublic PatternSet include(Iterable includes)
PatternFilterableinclude in interface PatternFilterableincludes - a Iterable providing more include patternsPattern Formatpublic PatternSet include(Spec<FileTreeElement> spec)
PatternFilterableinclude in interface PatternFilterablespec - the spec to addPattern Formatpublic Set<String> getExcludes()
PatternFilterablegetExcludes in interface PatternFilterablepublic Set<Spec<FileTreeElement>> getExcludeSpecs()
public PatternSet setExcludes(Iterable<String> excludes)
PatternFilterablePatternFilterable.exclude(Iterable) this replaces any previously
defined excludes.setExcludes in interface PatternFilterableexcludes - an Iterable providing new exclude patternsPattern Formatpublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public PatternSet includeSpecs(Iterable<Spec<FileTreeElement>> includeSpecs)
public PatternSet include(Closure closure)
PatternFilterableFileTreeElement as its parameter.
If includes are not provided, then all files in this container will be included. If includes are provided, then a
file must match at least one of the include patterns or specs to be included.include in interface PatternFilterableclosure - the spec to addPattern Formatpublic PatternSet exclude(String... excludes)
PatternFilterableexclude in interface PatternFilterableexcludes - a vararg list of exclude patternsPattern Formatpublic PatternSet exclude(Iterable excludes)
PatternFilterableexclude in interface PatternFilterableexcludes - a Iterable providing new exclude patternsPattern Formatpublic PatternSet exclude(Spec<FileTreeElement> spec)
PatternFilterableexclude in interface PatternFilterablespec - the spec to addPattern Formatpublic PatternSet excludeSpecs(Iterable<Spec<FileTreeElement>> excludes)
public PatternSet exclude(Closure closure)
PatternFilterableFileTreeElement as its parameter. The closure should return true or false. Example:
copySpec {
from 'source'
into 'destination'
//an example of excluding files from certain configuration:
exclude { it.file in configurations.someConf.files }
}
If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match
any exclude pattern to be processed.exclude in interface PatternFilterableclosure - the spec to addFileTreeElementpublic Object addToAntBuilder(Object node, String childNodeName)
addToAntBuilder in interface AntBuilderAware