de.dv.sbu.filefilter.buildin
Class PathFilter

java.lang.Object
  extended by de.dv.sbu.filefilter.buildin.PathFilter
All Implemented Interfaces:
IFileFilter

public class PathFilter
extends java.lang.Object
implements IFileFilter

File filter restricting on relative paths (including the full file name) by testing on matching a regular expression.

Author:
Daniel Vogtland

Constructor Summary
PathFilter()
           
 
Method Summary
 boolean acceptFile(SourceFileInformation fileInfo)
          Test the given file information object relative to some root directory.
 java.lang.String getPattern()
          Returns the path pattern.
 void setPattern(java.lang.String pattern)
          Sets the pattern (compare Pattern).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathFilter

public PathFilter()
Method Detail

getPattern

public java.lang.String getPattern()
Returns the path pattern.

Returns:
The current pattern.

setPattern

public void setPattern(java.lang.String pattern)
                throws java.lang.NullPointerException
Sets the pattern (compare Pattern). Keep in mind that the path separator is /.

Parameters:
pattern - The pattern to set.
Throws:
java.lang.NullPointerException - The pattern is null.

acceptFile

public boolean acceptFile(SourceFileInformation fileInfo)
Test the given file information object relative to some root directory.

Specified by:
acceptFile in interface IFileFilter
Parameters:
fileInfo - The file information to test.
Returns:
true if the file is accepted. false if the file is rejected.
See Also:
IFileFilter.acceptFile(de.dv.sbu.SourceFileInformation)