org.oddjob.launch
Class FileSpec

java.lang.Object
  extended by org.oddjob.launch.FileSpec

public class FileSpec
extends Object

Provide file matching for deriving the class path.

Author:
Rob Gordon.

Constructor Summary
FileSpec(File filespec)
          Constructor.
FileSpec(File filespec, boolean caseSensative)
          Constructor
 
Method Summary
 File[] getFiles()
          Get the files matching the filespec.
static boolean match(String pattern, String str, boolean isCaseSensitive)
          Tests whether or not a string matches against a pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSpec

public FileSpec(File filespec)
Constructor.

Parameters:
filespec -

FileSpec

public FileSpec(File filespec,
                boolean caseSensative)
Constructor

Parameters:
filespec -
caseSensative -
Method Detail

getFiles

public File[] getFiles()
Get the files matching the filespec.

Returns:
An array of all files.

match

public static boolean match(String pattern,
                            String str,
                            boolean isCaseSensitive)
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character

Parameters:
pattern - The pattern to match against. Must not be null.
str - The string which must be matched against the pattern. Must not be null.
isCaseSensitive - Whether or not matching should be performed case sensitively.
Returns:
true if the string matches against the pattern, or false otherwise.