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>

public class FileFilterAdapter extends AbstractFilter<File> implements Filter<File>, FileFilter
Filter implementation adapting a FileFilter instance to the Filter interface. Delegates the onCandidate(File) call to the supplied FileFilter delegate.
Since:
2.3
  • Field Details

  • Constructor Details

    • FileFilterAdapter

      public FileFilterAdapter(FileFilter delegate)
      Compound constructor, creating a FileFilterAdapter using the supplied FileFilter to determine if candidate Files should be accepted.
      Parameters:
      delegate - The delegate FileFilter.
  • Method Details

    • isInitialized

      public boolean isInitialized()
      Specified by:
      isInitialized in interface Filter<File>
      Overrides:
      isInitialized in class AbstractFilter<File>
      Returns:
      true if this Filter has been properly initialized (by a call to the initialize method).
    • setDelegate

      public void setDelegate(FileFilter delegate)
      Assigns the supplied FileFilter delegate.
      Parameters:
      delegate - A non-null FileFilter instance.
    • onCandidate

      protected boolean onCandidate(File nonNullCandidate)

      Method that is invoked to determine if a candidate instance should be accepted or not.

      Specified by:
      onCandidate in class AbstractFilter<File>
      Parameters:
      nonNullCandidate - The candidate that should be tested for acceptance by this Filter. Never null.
      Returns:
      true if the candidate is accepted by this Filter and false otherwise.