public class TestFinderQueue
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
TestFinderQueue.Observer
This interface provides a means for TestFinder to report on events that
might be of interest as it executes.
|
Modifier and Type | Field and Description |
---|---|
static byte |
FULL_READ_AHEAD
A constant specifying the test finder queue should perform complete
read ahead, reading all tests from the test finder before returning any
from this object.
|
static byte |
LOW_READ_AHEAD
A constant specifying the test finder queue should perform minimal
read ahead.
|
static byte |
MEDIUM_READ_AHEAD
A constant specifying the test finder queue should perform medium
(typical) read ahead.
|
static byte |
NO_READ_AHEAD
A constant specifying that the test finder queue should not perform
any read ahead.
|
Constructor and Description |
---|
TestFinderQueue()
Create a test finder queue.
|
TestFinderQueue(TestFinder finder)
Create a test finder queue, using a specified test finder.
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(TestFinderQueue.Observer o)
Add an observer to monitor the progress of the TestFinder.
|
void |
flush()
Flush all readahead.
|
int |
getErrorCount()
Get the number of errors that have been found so far by the test finder
while reading the tests.
|
int |
getFilesDoneCount()
Get the number of files that have been found and read so far.
|
int |
getFilesFoundCount()
Get the number of files that have been found so far.
|
int |
getFilesRemainingCount()
Get the number of files that have been found but not yet read so far.
|
java.io.File |
getRoot()
Get the root directory for the test finder.
|
TestFinder |
getTestFinder()
Get the test finder being used by this object.
|
int |
getTestsDoneCount()
Get the number of tests that have been read from this object so far.
|
int |
getTestsFoundCount()
Get the number of tests that have been found so far.
|
int |
getTestsRemainingCount()
Get the number of tests which have been found but not yet from this
object so far.
|
TestDescription |
next()
Get the next test description if one is available, or null when all have
been returned.
|
void |
removeObserver(TestFinderQueue.Observer o)
Remove an observer form the set currently monitoring the progress
of the TestFinder.
|
void |
repeat(TestDescription[] tds)
Deprecated.
retained for historical purposes
|
void |
setFilters(TestFilter[] filters)
Set an array of filters that will be used to filter the tests read by the
test finder.
|
void |
setReadAheadMode(byte mode)
Set the amount of read-ahead done by the finder.
|
void |
setTestFinder(TestFinder finder)
Set the test finder to be used by this object.
|
void |
setTests(java.lang.String[] initTests)
Set the initial set of files to be read by the test finder.
|
void |
setZeroTestsOK(boolean zeroTestsOK)
Set a flag indicating whether it is OK to find no tests in the
specified set of files.
|
public static final byte NO_READ_AHEAD
public static final byte LOW_READ_AHEAD
public static final byte MEDIUM_READ_AHEAD
public static final byte FULL_READ_AHEAD
public TestFinderQueue()
public TestFinderQueue(TestFinder finder)
finder
- the test finder to be used to read the testspublic TestFinder getTestFinder()
setTestFinder(com.sun.javatest.TestFinder)
public void setTestFinder(TestFinder finder)
finder
- the test finder to be used by this objectjava.lang.NullPointerException
- if the finder is nulljava.lang.IllegalStateException
- if the finder has already been setgetTestFinder()
public void setFilters(TestFilter[] filters)
filters
- the filters to be used.public void setTests(java.lang.String[] initTests)
initTests
- the initial set of files to be read by the test finderpublic void setZeroTestsOK(boolean zeroTestsOK)
zeroTestsOK
- set to true to suppress an error being generated
if no tests are found by the time that all files have been readpublic void repeat(TestDescription[] tds)
tds
- the test descriptions to be "found again".public TestDescription next()
public java.io.File getRoot()
public int getFilesFoundCount()
public int getFilesDoneCount()
public int getFilesRemainingCount()
public int getTestsFoundCount()
public int getTestsDoneCount()
public int getTestsRemainingCount()
public int getErrorCount()
public void addObserver(TestFinderQueue.Observer o)
o
- the observerpublic void removeObserver(TestFinderQueue.Observer o)
o
- the observerpublic void setReadAheadMode(byte mode)
mode
- acceptable values are as follows:
public void flush()
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.