public class TestFinderDecorator extends TestFinder
TestFinder.ErrorHandler, TestFinder.Fault
debug, env
Constructor and Description |
---|
TestFinderDecorator(TestFinder testFinder)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Comparator |
getComparator()
Get the current comparator being used.
|
TestFinder |
getCurrentTestFinder() |
java.io.File[] |
getFiles()
Get the files that were found by the most recent call
of read.
|
java.io.File |
getRoot()
Get the root file of the test suite, as passed in to the
init method. |
java.io.File |
getRootDir()
Get the root directory of the test suite; this is either the
root passed in to the init method or if that is a file, it is
the directory containing the file.
|
TestDescription[] |
getTests()
Get the test descriptions that were found by the most recent call
of read.
|
boolean |
isFolder(java.io.File path)
Determine whether a location corresponds to a directory (folder) or
an actual file.
|
long |
lastModified(java.io.File f)
Determine when the last time this path was modified.
|
void |
read(java.io.File file)
Read a file, looking for test descriptions and other files that might
need to be read.
|
protected void |
scan(java.io.File file)
Scan a file, looking for test descriptions and other files that might
need to be scanned.
|
void |
setComparator(java.util.Comparator c)
Incoming files and test descriptions are sorted by their name during
processing, this method allows adjustment of the comparison method to
be used during this sorting.
|
clearErrors, decodeAllArgs, decodeArg, error, error, error, foundFile, foundTestDescription, foundTestDescription, getDefaultComparator, getErrorCount, getErrorHandler, getErrors, init, init, localizedError, normalize, processEntry, setErrorHandler, setRoot
public TestFinderDecorator(TestFinder testFinder)
public java.io.File getRoot()
TestFinder
init
method.getRoot
in class TestFinder
TestFinder.setRoot(java.io.File)
public java.io.File getRootDir()
TestFinder
getRootDir
in class TestFinder
public void read(java.io.File file)
TestFinder
read
in class TestFinder
file
- The file to be read.public TestDescription[] getTests()
TestFinder
getTests
in class TestFinder
TestFinder.read(java.io.File)
,
TestFinder.foundTestDescription(java.util.Map, java.io.File, int)
public java.io.File[] getFiles()
TestFinder
getFiles
in class TestFinder
TestFinder.read(java.io.File)
,
TestFinder.foundFile(java.io.File)
public java.util.Comparator getComparator()
TestFinder
getComparator
in class TestFinder
TestFinder.setComparator(java.util.Comparator)
public void setComparator(java.util.Comparator c)
TestFinder
null
parameter. By default, this class will
do US Locale sorting.setComparator
in class TestFinder
c
- The comparison operator to be used. Null indicates no sorting (old behavior).TestFinder.getComparator()
,
TestFinder.foundTestDescription(TestDescription)
,
TestFinder.foundFile(File)
public TestFinder getCurrentTestFinder()
public long lastModified(java.io.File f)
TestFinder
lastModified
in class TestFinder
f
- The location in question.public boolean isFolder(java.io.File path)
TestFinder
isFolder
in class TestFinder
path
- The location in question.protected void scan(java.io.File file)
TestFinder
scan
in class TestFinder
file
- The file to scanCopyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.