Package org.apache.torque.generator.file

# Class WildcardFilter

java.lang.Object
org.apache.torque.generator.file.WildcardFilter

All Implemented Interfaces:
  `FileFilter`

public class WildcardFilter extends Object implements FileFilter
A filter evaluating a file name against a wildcard expression.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WildcardFilter(String expression, boolean acceptDir, boolean acceptFile)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(File file)`
  Returns whether a file matches the criteria of this filter.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### WildcardFilter

    public WildcardFilter(String expression, boolean acceptDir, boolean acceptFile)
    Constructor.
    Parameters:
      `expression` - The wildcard expression against which the file names are checked.
      `acceptDir` - Whether directories are accepted at all.
      `acceptFile` - Whether files are accepted at all.

- ## Method Details

  - ### accept

    public boolean accept(File file)
    Returns whether a file matches the criteria of this filter. If the file is a directory and `acceptDir` is false, the file is rejected. If the file is regular file and `acceptFile` is false, the file is rejected. If the filename does not match the wildcard filter, the file is rejected. If none of the above applies, the file is accepted.
    Specified by:
      `accept` in interface `FileFilter`
    Returns:
      false if the file is rejected, true if it is accepted.