uk.org.retep.util.io
Class PackageFileFilter.Exclude

java.lang.Object
  extended by uk.org.retep.util.io.PatternFileFilter
      extended by uk.org.retep.util.io.PackageFileFilter
          extended by uk.org.retep.util.io.PackageFileFilter.Exclude
All Implemented Interfaces:
java.io.FileFilter
Enclosing class:
PackageFileFilter

public static final class PackageFileFilter.Exclude
extends PackageFileFilter

An Exclude filter, where all files that do not match, but are under the base directory are included.


Nested Class Summary
 
Nested classes/interfaces inherited from class uk.org.retep.util.io.PackageFileFilter
PackageFileFilter.Exclude, PackageFileFilter.Include
 
Field Summary
 
Fields inherited from class uk.org.retep.util.io.PatternFileFilter
DOT, DOT_REGEX
 
Constructor Summary
PackageFileFilter.Exclude(java.io.File baseDirectory, java.util.Collection<?> patterns)
          Create a FileFilter with the supplied patterns.
PackageFileFilter.Exclude(java.io.File baseDirectory, java.util.regex.Pattern... patterns)
          Create a FileFilter with the supplied Patterns.
PackageFileFilter.Exclude(java.io.File baseDirectory, java.lang.String... globs)
          Create a FileFilter with the supplied globs.
 
Method Summary
 boolean accept(java.io.File file)
          Accept all files that are beneath the base directory and do not match any Pattern
 
Methods inherited from class uk.org.retep.util.io.PackageFileFilter
add
 
Methods inherited from class uk.org.retep.util.io.PatternFileFilter
add, addAll, addAll, addAll, convertPackage, getMatcher, inScope, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageFileFilter.Exclude

public PackageFileFilter.Exclude(java.io.File baseDirectory,
                                 java.util.regex.Pattern... patterns)
Create a FileFilter with the supplied Patterns.

Parameters:
baseDirectory - The base directory
patterns - Pattern array to include

PackageFileFilter.Exclude

public PackageFileFilter.Exclude(java.io.File baseDirectory,
                                 java.lang.String... globs)
Create a FileFilter with the supplied globs.

Parameters:
baseDirectory - The base directory
globs - String array to include

PackageFileFilter.Exclude

public PackageFileFilter.Exclude(java.io.File baseDirectory,
                                 java.util.Collection<?> patterns)
Create a FileFilter with the supplied patterns.

Parameters:
baseDirectory - The base directory
patterns - Collection that can contain either Pattern or String objects.
Method Detail

accept

public final boolean accept(java.io.File file)
Accept all files that are beneath the base directory and do not match any Pattern

Parameters:
file - File to test
Returns:
true if the file is not to be excluded.


Copyright © 1998-2010 Retep Development Group. All Rights Reserved.