Package org.gradle.api.tasks.util
Klasse PatternSet
java.lang.Object
org.gradle.api.tasks.util.PatternSet
- Alle implementierten Schnittstellen:
AntBuilderAware,PatternFilterable
Standalone implementation of
PatternFilterable.-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedPatternSet(org.gradle.api.tasks.util.internal.PatternSpecFactory patternSpecFactory) protectedPatternSet(PatternSet patternSet) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddToAntBuilder(Object node, String childNodeName) copyFrom(PatternFilterable sourcePattern) protected PatternSetdoCopyFrom(PatternSet from) booleanAdds an exclude spec.Adds an ANT style exclude pattern.Adds an ANT style exclude pattern.exclude(Spec<FileTreeElement> spec) Adds an exclude spec.excludeSpecs(Iterable<Spec<FileTreeElement>> excludes) Returns the set of exclude patterns.LikegetExcludeSpecs(), but returns a unmodifiable view or empty set.LikegetExcludes(), but returns a unmodifiable view or empty set.Returns the set of include patterns.LikegetIncludeSpecs(), but returns a unmodifiable view or empty set.LikegetIncludes(), but returns a unmodifiable view or empty set.inthashCode()Adds an include spec.Adds an ANT style include pattern.Adds an ANT style include pattern.include(Spec<FileTreeElement> spec) Adds an include spec.includeSpecs(Iterable<Spec<FileTreeElement>> includeSpecs) booleanbooleanisEmpty()The PatternSet is considered empty when no includes or excludes have been added.voidsetCaseSensitive(boolean caseSensitive) setExcludes(Iterable<String> excludes) Set the allowable exclude patterns.setIncludes(Iterable<String> includes) Set the allowable include patterns.
-
Konstruktordetails
-
PatternSet
public PatternSet() -
PatternSet
-
PatternSet
protected PatternSet(org.gradle.api.tasks.util.internal.PatternSpecFactory patternSpecFactory)
-
-
Methodendetails
-
equals
-
hashCode
public int hashCode() -
copyFrom
-
doCopyFrom
-
intersect
-
isEmpty
public boolean isEmpty()The PatternSet is considered empty when no includes or excludes have been added. The Spec returned by getAsSpec method only contains the default excludes patterns in this case.- Gibt zurück:
- true when no includes or excludes have been added to this instance
-
getAsSpec
-
getAsIncludeSpec
-
getAsExcludeSpec
-
getIncludesView
LikegetIncludes(), but returns a unmodifiable view or empty set.Use this if you are only reading from the set, as it avoids allocating a set if not needed.
- Gibt zurück:
- the include patterns, or an empty set if none
- Seit:
- 8.8
-
getIncludes
Beschreibung aus Schnittstelle kopiert:PatternFilterableReturns the set of include patterns.- Angegeben von:
getIncludesin SchnittstellePatternFilterable- Gibt zurück:
- The include patterns. Returns an empty set when there are no include patterns.
-
getIncludeSpecsView
LikegetIncludeSpecs(), but returns a unmodifiable view or empty set.Use this if you are only reading from the set, as it avoids allocating a set if not needed.
- Gibt zurück:
- the include specs, or an empty set if none
- Seit:
- 8.8
-
getIncludeSpecs
-
setIncludes
Beschreibung aus Schnittstelle kopiert:PatternFilterableSet the allowable include patterns. Note that unlikePatternFilterable.include(Iterable)this replaces any previously defined includes.- Angegeben von:
setIncludesin SchnittstellePatternFilterable- Parameter:
includes- an Iterable providing new include patterns- Gibt zurück:
- this
- Siehe auch:
-
include
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. 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 to be processed.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includes- a vararg list of include patterns- Gibt zurück:
- this
- Siehe auch:
-
include
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. 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 to be processed.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includes- a Iterable providing more include patterns- Gibt zurück:
- this
- Siehe auch:
-
include
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an include spec. This method may be called multiple times to append new specs. 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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
spec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
getExcludesView
LikegetExcludes(), but returns a unmodifiable view or empty set.Use this if you are only reading from the set, as it avoids allocating a set if not needed.
- Gibt zurück:
- the exclude patterns, or an empty set if none
- Seit:
- 8.8
-
getExcludes
Beschreibung aus Schnittstelle kopiert:PatternFilterableReturns the set of exclude patterns.- Angegeben von:
getExcludesin SchnittstellePatternFilterable- Gibt zurück:
- The exclude patterns. Returns an empty set when there are no exclude patterns.
-
getExcludeSpecsView
LikegetExcludeSpecs(), but returns a unmodifiable view or empty set.Use this if you are only reading from the set, as it avoids allocating a set if not needed.
- Gibt zurück:
- the exclude specs, or an empty set if none
- Seit:
- 8.8
-
getExcludeSpecs
-
setExcludes
Beschreibung aus Schnittstelle kopiert:PatternFilterableSet the allowable exclude patterns. Note that unlikePatternFilterable.exclude(Iterable)this replaces any previously defined excludes.- Angegeben von:
setExcludesin SchnittstellePatternFilterable- Parameter:
excludes- an Iterable providing new exclude patterns- Gibt zurück:
- this
- Siehe auch:
-
isCaseSensitive
public boolean isCaseSensitive() -
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive) -
includeSpecs
-
include
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an include spec. This method may be called multiple times to append new specs. The given closure is passed aFileTreeElementas 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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
closure- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
exclude
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. 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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludes- a vararg list of exclude patterns- Gibt zurück:
- this
- Siehe auch:
-
exclude
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. 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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludes- a Iterable providing new exclude patterns- Gibt zurück:
- this
- Siehe auch:
-
exclude
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an exclude spec. This method may be called multiple times to append new specs. 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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
spec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
excludeSpecs
-
exclude
Beschreibung aus Schnittstelle kopiert:PatternFilterableAdds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed aFileTreeElementas 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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
closure- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
addToAntBuilder
- Angegeben von:
addToAntBuilderin SchnittstelleAntBuilderAware
-