Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks.util
Interface PatternFilterable

All Known Subinterfaces:
  ConfigurableFileTree, CopyAction, CopySpec, SourceDirectorySet

All Known Implementing Classes:
  Checkstyle, CodeNarc, Compile, Copy, GroovyCompile, Groovydoc, Javadoc, ScalaCompile, ScalaDoc, SourceTask, Test

    public interface PatternFilterable

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

- '*' to match any number of characters
- '?' to match any single character
- '**' to match any number of directories or files

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.Iterable<java.lang.String> excludes)` Adds an ANT style exclude pattern.
`PatternFilterable` | `exclude(java.lang.String... excludes)` Adds an ANT style exclude pattern.
`java.util.Set<java.lang.String>` | `getExcludes()` Get the set of exclude patterns.
`java.util.Set<java.lang.String>` | `getIncludes()` Get the set of include patterns.
`PatternFilterable` | `include(java.lang.Iterable<java.lang.String> includes)` Adds an ANT style include pattern.
`PatternFilterable` | `include(java.lang.String... includes)` Adds an ANT style include pattern.
`PatternFilterable` | `setExcludes(java.lang.Iterable<java.lang.String> excludes)` Set the allowable exclude patterns.
`PatternFilterable` | `setIncludes(java.lang.Iterable<java.lang.String> includes)` Set the allowable include patterns.

Method Detail

### getIncludes

    java.util.Set<java.lang.String> getIncludes()

  Get the set of include patterns.

### getExcludes

    java.util.Set<java.lang.String> getExcludes()

  Get the set of exclude patterns.

### setIncludes

    PatternFilterable setIncludes(java.lang.Iterable<java.lang.String> includes)

  Set the allowable include patterns. Note that unlike `include(Iterable)` this replaces any previously defined includes.

  Parameters:
    `includes` - an Iterable providing new include patterns
  See Also:
    `Pattern Format`

### setExcludes

    PatternFilterable setExcludes(java.lang.Iterable<java.lang.String> excludes)

  Set the allowable exclude patterns. Note that unlike `exclude(Iterable)` this replaces any previously defined excludes.

  Parameters:
    `excludes` - an Iterable providing new exclude patterns
  See Also:
    `Pattern Format`

### include

    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.

  Parameters:
    `includes` - a vararg list of include patterns
  See Also:
    `Pattern Format`

### include

    PatternFilterable include(java.lang.Iterable<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.

  Parameters:
    `includes` - a Iterable providing more include patterns
  See Also:
    `Pattern Format`

### exclude

    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.

  Parameters:
    `excludes` - a vararg list of exclude patterns
  See Also:
    `Pattern Format`

### exclude

    PatternFilterable exclude(java.lang.Iterable<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.

  Parameters:
    `excludes` - a Iterable providing new exclude patterns
  See Also:
    `Pattern Format`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD