Class FileFilterAdapter
java.lang.Object
org.codehaus.mojo.jaxb2.shared.filters.AbstractFilter<File>
org.codehaus.mojo.jaxb2.shared.filters.pattern.FileFilterAdapter
- All Implemented Interfaces:
FileFilter,Filter<File>
Filter implementation adapting a FileFilter instance to the Filter interface.
Delegates the
onCandidate(File) call to the supplied FileFilter delegate.- Since:
- 2.3
- Author:
- Lennart Jörelid, jGuru Europe AB
-
Field Summary
Fields inherited from class org.codehaus.mojo.jaxb2.shared.filters.AbstractFilter
log, TOSTRING_INDENT -
Constructor Summary
ConstructorsConstructorDescriptionFileFilterAdapter(FileFilter delegate) Compound constructor, creating a FileFilterAdapter using the suppliedFileFilterto determine if candidate Files should be accepted. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleanonCandidate(File nonNullCandidate) Method that is invoked to determine if a candidate instance should be accepted or not.voidsetDelegate(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, validateDiSetterCalledBeforeInitializationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.io.FileFilter
acceptMethods inherited from interface org.codehaus.mojo.jaxb2.shared.filters.Filter
accept, initialize
-
Constructor Details
-
FileFilterAdapter
Compound constructor, creating a FileFilterAdapter using the suppliedFileFilterto determine if candidate Files should be accepted.- Parameters:
delegate- The delegate FileFilter.
-
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceFilter<File>- Overrides:
isInitializedin classAbstractFilter<File>- Returns:
trueif this Filter has been properly initialized (by a call to theinitializemethod).
-
setDelegate
Assigns the supplied FileFilter delegate.- Parameters:
delegate- A non-null FileFilter instance.
-
onCandidate
Method that is invoked to determine if a candidate instance should be accepted or not.
- Specified by:
onCandidatein classAbstractFilter<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.
-