Class FileFilterAdapter
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.shared.filters.AbstractFilter<java.io.File>
-
- org.codehaus.mojo.jaxb2.shared.filters.pattern.FileFilterAdapter
-
- All Implemented Interfaces:
java.io.FileFilter,Filter<java.io.File>
public class FileFilterAdapter extends AbstractFilter<java.io.File> implements Filter<java.io.File>, java.io.FileFilter
Filter implementation adapting a FileFilter instance to the Filter interface. Delegates theonCandidate(File)call to the suppliedFileFilterdelegate.- Since:
- 2.3
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FileFilterdelegate-
Fields inherited from class org.codehaus.mojo.jaxb2.shared.filters.AbstractFilter
log, TOSTRING_INDENT
-
-
Constructor Summary
Constructors Constructor Description FileFilterAdapter(java.io.FileFilter delegate)Compound constructor, creating a FileFilterAdapter using the suppliedFileFilterto determine if candidate Files should be accepted.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInitialized()protected booleanonCandidate(java.io.File nonNullCandidate)Method that is invoked to determine if a candidate instance should be accepted or not.voidsetDelegate(java.io.FileFilter delegate)Assigns the supplied FileFilter delegate.-
Methods inherited from class org.codehaus.mojo.jaxb2.shared.filters.AbstractFilter
accept, addDelayedLogMessage, initialize, onInitialize, onNullCandidate, setProcessNullValues, toString, validateDiSetterCalledBeforeInitialization
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.mojo.jaxb2.shared.filters.Filter
accept, initialize
-
-
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceFilter<java.io.File>- Overrides:
isInitializedin classAbstractFilter<java.io.File>- Returns:
trueif this Filter has been properly initialized (by a call to theinitializemethod).
-
setDelegate
public void setDelegate(java.io.FileFilter delegate)
Assigns the supplied FileFilter delegate.- Parameters:
delegate- A non-null FileFilter instance.
-
onCandidate
protected boolean onCandidate(java.io.File nonNullCandidate)
Method that is invoked to determine if a candidate instance should be accepted or not.
- Specified by:
onCandidatein classAbstractFilter<java.io.File>- Parameters:
nonNullCandidate- The candidate that should be tested for acceptance by this Filter. Never null.- Returns:
trueif the candidate is accepted by this Filter andfalseotherwise.
-
-