bb.io.filefilter
Class ClassFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bb.io.filefilter.BaseFilter
          extended by bb.io.filefilter.RegexFilter
              extended by bb.io.filefilter.SuffixFilter
                  extended by bb.io.filefilter.ClassFilter
All Implemented Interfaces:
FileFilter

public class ClassFilter
extends SuffixFilter

File filter that accepts Java class files.

Specificly, this file filter accepts only normal files whose names end with the extension ".class" (case insensitive). Directories and other file system elements are always rejected, which could affect directory drill down (see DirUtil.getTree and DirUtil.getFilesInTree).

This class is multithread safe: it is immutable. In particular, it maintains its ancestor class's immutability.

Author:
Brent Boyer

Nested Class Summary
 
Nested classes/interfaces inherited from class bb.io.filefilter.SuffixFilter
SuffixFilter.UnitTest
 
Constructor Summary
ClassFilter()
          Constructs a new ClassFilter instance.
 
Method Summary
 String getDescription()
          Returns a description of this filter.
 
Methods inherited from class bb.io.filefilter.SuffixFilter
getDescriptionIntro, getSuffixes, toPatternLiterals
 
Methods inherited from class bb.io.filefilter.RegexFilter
getPatterns, passesTest, toPatterns, toSet
 
Methods inherited from class bb.io.filefilter.BaseFilter
accept, acceptImpl, extractPart, getDirectoryMode, getFileMode, getListener, getOtherMode, getPartMode, passesTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFilter

public ClassFilter()
Constructs a new ClassFilter instance.

Method Detail

getDescription

public String getDescription()
Returns a description of this filter.

Overrides:
getDescription in class SuffixFilter