public class PatternFileFilter extends AbstractPatternFilter<File> implements FileFilter
AbstractPatternFilter and FileFilter combination, using a set of Regular expressions to accept the canonical absolute paths to Files.
| Modifier and Type | Field and Description |
|---|---|
static StringConverter<File> |
FILE_PATH_CONVERTER
Converter returning the canonical and absolute path for a File.
|
static String |
FILE_SUFFIX_PATTERN_PREFIX
Java RegExp pattern which should be prepended to any file suffix pattern.
|
log, TOSTRING_INDENT| Constructor and Description |
|---|
PatternFileFilter()
Creates a new PatternFileFilter with no patternStrings List, implying that calling this constructor must be
followed by a call to the
#setPatterns method. |
PatternFileFilter(boolean processNullValues,
String patternPrefix,
List<String> patterns,
StringConverter<File> converter,
boolean acceptCandidateOnPatternMatch)
Compound constructor creating an PatternFileFilter from the supplied parameters.
|
PatternFileFilter(List<String> patterns)
Creates a new PatternFileFilter using the supplied patternStrings which are interpreted as file suffixes.
|
PatternFileFilter(List<String> patternStrings,
boolean acceptCandidateOnPatternMatch)
Creates a new PatternFileFilter using the supplied patternStrings which are interpreted as file suffixes.
|
| Modifier and Type | Method and Description |
|---|---|
static List<Filter<File>> |
createExcludeFilterList(org.apache.maven.plugin.logging.Log log,
String... patterns)
Creates a new List containing an exclude-mode PatternFileFilter using the supplied patternStrings which
are interpreted as file suffixes.
|
static List<Filter<File>> |
createIncludeFilterList(org.apache.maven.plugin.logging.Log log,
String... patterns)
Creates a new List containing an include-mode PatternFileFilter using the supplied patternStrings which
are interpreted as file suffixes.
|
convert, convert, onCandidate, onInitialize, setAcceptCandidateOnPatternMatch, setConverter, setPatternPrefix, setPatterns, toStringaccept, addDelayedLogMessage, initialize, isInitialized, onNullCandidate, setProcessNullValues, validateDiSetterCalledBeforeInitializationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptpublic static final String FILE_SUFFIX_PATTERN_PREFIX
FILE_SUFFIX_PATTERN_PREFIX + "txt".public static final StringConverter<File> FILE_PATH_CONVERTER
public PatternFileFilter(boolean processNullValues,
String patternPrefix,
List<String> patterns,
StringConverter<File> converter,
boolean acceptCandidateOnPatternMatch)
processNullValues - if true, this PatternFileFilter process null candidate values.patternPrefix - a prefix to be prepended to any patterns submitted to
this PatternFileFilterpatterns - The non-null list of Patters which should be applied within this
PatternFileFilter.converter - The StringConverter which converts Files to Strings for Pattern matching.acceptCandidateOnPatternMatch - if true, this PatternFileFilter will matchAtLeastOnce
candidate objects that match at least one of the supplied patterns.
if false, this PatternFileFilter will noFilterMatches
candidates that match at least one of the supplied patterns.public PatternFileFilter(List<String> patternStrings, boolean acceptCandidateOnPatternMatch)
FILE_SUFFIX_PATTERN_PREFIX and compiled to Patterns).
The FILE_PATH_CONVERTER is used to convert Files to strings.
The supplied acceptCandidateOnPatternMatch parameter indicates if this
PatternFileFilter accepts or rejects candidates that match any of the supplied patternStrings.patternStrings - The list of patternStrings to be used as file path suffixes.acceptCandidateOnPatternMatch - if true, this PatternFileFilter will matchAtLeastOnce
candidate objects that match at least one of the supplied patterns.
if false, this PatternFileFilter will noFilterMatches
candidates that match at least one of the supplied patterns.FILE_PATH_CONVERTER,
FILE_SUFFIX_PATTERN_PREFIX,
AbstractPatternFilter.convert(java.util.List, String)public PatternFileFilter(List<String> patterns)
FILE_SUFFIX_PATTERN_PREFIX and compiled to Patterns).
The FILE_PATH_CONVERTER is used to convert Files to strings.
The retrieved PatternFileFilter accepts candidates that match any of the supplied patternStrings.patterns - The list of patternStrings to be used as file path suffixes.public PatternFileFilter()
Creates a new PatternFileFilter with no patternStrings List, implying that calling this constructor must be
followed by a call to the #setPatterns method.
The default prefix is FILE_SUFFIX_PATTERN_PREFIX, the default StringConverter is
FILE_PATH_CONVERTER and this PatternFileFilter does by default accept candidates that match any of
the supplied PatternStrings (i.e. an include-mode filter)
public static List<Filter<File>> createExcludeFilterList(org.apache.maven.plugin.logging.Log log, String... patterns)
FILE_SUFFIX_PATTERN_PREFIX and compiled to
Patterns). The FILE_PATH_CONVERTER is used to convert Files to strings.patterns - A List of suffix patterns to be used in creating a new ExclusionRegularExpressionFileFilter.log - The active Maven Log.PatternFileFilterpublic static List<Filter<File>> createIncludeFilterList(org.apache.maven.plugin.logging.Log log, String... patterns)
FILE_SUFFIX_PATTERN_PREFIX and compiled to
Patterns). The FILE_PATH_CONVERTER is used to convert Files to strings.patterns - A List of suffix patterns to be used in creating a new ExclusionRegularExpressionFileFilter.log - The active Maven Log.PatternFileFilterCopyright © 2005–2015 MojoHaus. All rights reserved.