GigaSpaces XAP 9.7.2 API

com.sun.jini.system
Class JavaSourceFilter

java.lang.Object
  extended by com.sun.jini.system.JavaSourceFilter
All Implemented Interfaces:
FileFilter

public class JavaSourceFilter
extends Object
implements FileFilter

Implementation of FilenameFilter to allow us to just look for java files by default, or other file extensions if the user wishes to use a different extension.

Author:
Sun Microsystems, Inc.

Constructor Summary
JavaSourceFilter()
          Create a filter for *.java files.
JavaSourceFilter(String fileExtension)
          Create a filter for a user defined extension.
 
Method Summary
 boolean accept(File filename)
          Method required by FilenameFilter interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSourceFilter

public JavaSourceFilter()
Create a filter for *.java files.


JavaSourceFilter

public JavaSourceFilter(String fileExtension)
Create a filter for a user defined extension. If an empty string is passed then all files will be matched.

Parameters:
fileExtension - The extension the user is looking for.
Method Detail

accept

public boolean accept(File filename)
Method required by FilenameFilter interface. It is called by File.list() to get a subset of the files in the given directory.

Specified by:
accept in interface FileFilter
Parameters:
filename - The current file we are looking at.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.