java.lang.Object
com.further.jaudit.SourceFilenameFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
- public class SourceFilenameFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
This filter implements a source file filter for directory traversal.
The intent of the filter is to allow the configuration to statically
specify file extensions that are valid source files, then the system
uses the SourceFilenameFilter to test the contents of the source
tree against those extensions.
- Since:
- 1.0
- Version:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sourceFileExtensions
private static java.util.Set sourceFileExtensions
- This set contains the list of extensions that constitute
source files, without the last "."
instance
private static SourceFilenameFilter instance
- The singleton instance of the source filename filter
SourceFilenameFilter
private SourceFilenameFilter()
- This class is a singleton, it cannot be created.
registerSourceExtension
public static void registerSourceExtension(java.lang.String ext)
- Register the given extension as a valid source file extension
for cataloging. This assumes the given extension does not
include the trailing ".".
getInstance
public static SourceFilenameFilter getInstance()
- Retreive the global singleton for the source filename filter.
accept
public boolean accept(java.io.File dir,
java.lang.String name)
- Test if a file is a source file, which implies that it
has a specific extension that is registered with the
configuration system (and subsequently in the source file
extension set)
- Specified by:
accept in interface java.io.FilenameFilter