Groovy Documentation

org.gradle.api.tasks.util
Interface PatternFilterable


interface PatternFilterable

A PatternFilterable represents some file container which Ant-style include and exclude patterns can be applied to. Patterns may include:

Either '/' or '\' may be used in a pattern to separate directories. Patterns ending with '/' or '\' will have '**' automatically appended. Examples:
 all files ending with 'jsp' (including subdirectories)
    **/*.jsp

 all files beginning with 'template_' in the level1/level2 directory
    level1/level2/template_*

 all files (including subdirectories) beneath src/main/webapp
   src/main/webapp/

 all files beneath any .svn directory (including subdirectories) under src/main/java
   src/main/java/**/.svn/**
 


Method Summary
PatternFilterable exclude(java.lang.String excludes)

Adds an ANT style exclude pattern.

PatternFilterable exclude(java.lang.Iterable excludes)

Adds an ANT style exclude pattern.

Set getExcludes()

Get the set of exclude patterns.

Set getIncludes()

Get the set of include patterns.

PatternFilterable include(java.lang.String includes)

Adds an ANT style include pattern.

PatternFilterable include(java.lang.Iterable includes)

Adds an ANT style include pattern.

PatternFilterable setExcludes(java.lang.Iterable excludes)

Set the allowable exclude patterns.

PatternFilterable setIncludes(java.lang.Iterable includes)

Set the allowable include patterns.

 

Method Detail

exclude

public PatternFilterable exclude(java.lang.String excludes)
Adds 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.
param:
excludes a vararg list of exclude patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


exclude

public PatternFilterable exclude(java.lang.Iterable excludes)
Adds 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.
param:
excludes a Iterable providing new exclude patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


getExcludes

public Set getExcludes()
Get the set of exclude patterns.


getIncludes

public Set getIncludes()
Get the set of include patterns.


include

public PatternFilterable include(java.lang.String includes)
Adds 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 beneath the base directory will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
param:
includes a vararg list of include patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


include

public PatternFilterable include(java.lang.Iterable includes)
Adds 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 beneath the base directory will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
param:
includes a Iterable providing more include patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


setExcludes

public PatternFilterable setExcludes(java.lang.Iterable excludes)
Set the allowable exclude patterns. Note that unlike #exclude(Iterable) this replaces any previously defined excludes.
param:
excludes an Iterable providing new exclude patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


setIncludes

public PatternFilterable setIncludes(java.lang.Iterable includes)
Set the allowable include patterns. Note that unlike #include(Iterable) this replaces any previously defined includes.
param:
includes an Iterable providing new include patterns
see:
org.gradle.api.tasks.util.PatternFilterable Pattern Format


 

Groovy Documentation