Interface Filter<T>
- All Known Implementing Classes:
AbstractFilter,AbstractPatternFilter,FileFilterAdapter,PatternFileFilter,PatternURLFilter
public interface Filter<T>
Generic Filter specification, whose implementations define if candidate objects should be accepted or not.
- Since:
- 2.0
- Author:
- Lennart Jörelid, jGuru Europe AB
-
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod that is invoked to determine if a candidate instance should be accepted or not.voidinitialize(org.apache.maven.plugin.logging.Log log) Initializes this Filter, and assigns the supplied Log for use by this Filter.boolean
-
Method Details
-
initialize
void initialize(org.apache.maven.plugin.logging.Log log) Initializes this Filter, and assigns the supplied Log for use by this Filter.- Parameters:
log- The non-null Log which should be used by this Filter to emit log messages.
-
isInitialized
boolean isInitialized()- Returns:
trueif this Filter has been properly initialized (by a call to theinitializemethod).
-
accept
Method that is invoked to determine if a candidate instance should be accepted or not. Implementing classes should be prepared to handle
nullcandidate objects.- Parameters:
candidate- The candidate that should be tested for acceptance by this Filter.- Returns:
trueif the candidate is accepted by this Filter andfalseotherwise.- Throws:
IllegalStateException- if this Filter is not initialized by a call to the initialize method before calling this matchAtLeastOnce method.
-