|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.ExcludeList
public class ExcludeList
A set of tests to be excluded from a test run.
Nested Class Summary | |
---|---|
static class |
ExcludeList.Entry
An entry in the exclude list. |
static class |
ExcludeList.Fault
This exception is used to report problems manipulating an exclude list. |
Field Summary | |
---|---|
static java.lang.String |
EXCLUDEFILE_EXTN
The standard extension for exclude-list files. |
Constructor Summary | |
---|---|
ExcludeList()
Create a new exclude list. |
|
ExcludeList(java.io.File f)
Create an ExcludeList from the data contained in a file. |
|
ExcludeList(java.io.File[] files)
Create an ExcludeList from the data contained in a series of files. |
|
ExcludeList(java.io.File[] files,
boolean strict)
Create an ExcludeList from the data contained in a series of files. |
|
ExcludeList(java.io.File f,
boolean strict)
Create an ExcludeList from the data contained in a file. |
Method Summary | |
---|---|
void |
addEntry(ExcludeList.Entry e)
Add an entry to the table. |
boolean |
equals(java.lang.Object obj)
|
boolean |
excludesAllOf(java.lang.String url)
Test if a specific test is completely excluded according to the table. |
boolean |
excludesAllOf(TestDescription td)
Test if a specific test is completely excluded according to the table. |
boolean |
excludesAnyOf(java.lang.String url)
Test if a specific test is partially or completely excluded according to the table. |
boolean |
excludesAnyOf(TestDescription td)
Test if a specific test is partially or completely excluded according to the table. |
ExcludeList.Entry |
getEntry(java.lang.String url)
Locate an entry for a test. |
ExcludeList.Entry |
getEntry(java.lang.String url,
java.lang.String testCase)
Locate an entry for a test. |
java.util.Iterator |
getIterator(boolean group)
Iterate over the contents of the table. |
java.lang.String[] |
getTestCases(TestDescription td)
Get the test cases to be excluded for a test. |
java.lang.String |
getTitle()
Get the title for this exclude list. |
int |
hashCode()
|
boolean |
isEmpty()
Check whether an exclude list has any entries or not. |
static boolean |
isExcludeFile(java.io.File f)
Test if a file appears to be for an exclude list, by checking the extension. |
boolean |
isStrictModeEnabled()
Check whether strict mode is enabled or not. |
void |
merge(ExcludeList other)
Merge the contents of another exclude list into this one. |
void |
removeEntry(ExcludeList.Entry e)
Remove an entry from the table. |
void |
setStrictModeEnabled(boolean on)
Specify whether strict mode is on or not. |
void |
setTitle(java.lang.String title)
Set the title for this exclude list. |
int |
size()
Get the number of entries in the table. |
void |
write(java.io.File f)
Write the table out to a file. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXCLUDEFILE_EXTN
Constructor Detail |
---|
public ExcludeList()
public ExcludeList(java.io.File f) throws java.io.FileNotFoundException, java.io.IOException, ExcludeList.Fault
f
- The file to be read.
java.io.FileNotFoundException
- if the file cannot be found
java.io.IOException
- if any problems occur while reading the file
ExcludeList.Fault
- if the data in the file is ionconsistentExcludeList(File[])
public ExcludeList(java.io.File f, boolean strict) throws java.io.FileNotFoundException, java.io.IOException, ExcludeList.Fault
f
- The file to be read.strict
- Indicate if strict data checking rules should be used.
java.io.FileNotFoundException
- if the file cannot be found
java.io.IOException
- if any problems occur while reading the file
ExcludeList.Fault
- if the data in the file is inconsistentExcludeList(File[])
,
setStrictModeEnabled(boolean)
public ExcludeList(java.io.File[] files) throws java.io.FileNotFoundException, java.io.IOException, ExcludeList.Fault
files
- The file to be read.
java.io.FileNotFoundException
- if any of the files cannot be found
java.io.IOException
- if any problems occur while reading the files.
ExcludeList.Fault
- if the data in the files is inconsistentExcludeList(File)
public ExcludeList(java.io.File[] files, boolean strict) throws java.io.FileNotFoundException, java.io.IOException, ExcludeList.Fault
files
- The file to be read.strict
- Indicate if strict data checking rules should be used.
java.io.FileNotFoundException
- if any of the files cannot be found
java.io.IOException
- if any problems occur while reading the files.
ExcludeList.Fault
- if the data in the files is inconsistentExcludeList(File)
,
setStrictModeEnabled(boolean)
Method Detail |
---|
public static boolean isExcludeFile(java.io.File f)
f
- The file to be tested.
true
public void setStrictModeEnabled(boolean on)
on
- true if strict mode should be enabled, and false otherwiseisStrictModeEnabled()
public boolean isStrictModeEnabled()
setStrictModeEnabled(boolean)
public boolean excludesAllOf(TestDescription td)
td
- A test description for the test being checked.
true
if the table contains an entry for this test.public boolean excludesAllOf(java.lang.String url)
url
- The test-suite root-relative URL for the test.
true
if the table contains an entry for this test.public boolean excludesAnyOf(TestDescription td)
td
- A test description for the test being checked.
true
if the table contains an entry for this test.public boolean excludesAnyOf(java.lang.String url)
url
- The test-suite root-relative URL for the test.
true
if the table contains an entry for this test.public java.lang.String[] getTestCases(TestDescription td)
td
- A test description for the test being checked.
public void addEntry(ExcludeList.Entry e) throws ExcludeList.Fault
e
- The entry to be added; if an entry already exists for this test
description, it will be replaced.
ExcludeList.Fault
- if the entry is for the entire test and
there is already an entry for a test case for this test, or vice versa.public ExcludeList.Entry getEntry(java.lang.String url)
url
- The root relative URL for the test; the URL may include
a test case if necessary included in square brackets after the URL proper.
public ExcludeList.Entry getEntry(java.lang.String url, java.lang.String testCase)
url
- The root relative URL for the test.testCase
- An optional test case to be taken into account. This cannot
be a comma separated list. A value of null will match any entry with the given
url.
public void merge(ExcludeList other)
other
- the exclude list to be merged with this one.public void removeEntry(ExcludeList.Entry e)
e
- the entry to be removedpublic boolean isEmpty()
size()
public int size()
isEmpty()
public java.util.Iterator getIterator(boolean group)
group
- if true
, entries for the same relative
URL are grouped together, and if more than one, returned in an
array; if false
, the iterator always returns
separate entries.
group
parameter.ExcludeList.Entry
public java.lang.String getTitle()
setTitle(java.lang.String)
public void setTitle(java.lang.String title)
title
- the title for this exclude listgetTitle()
public void write(java.io.File f) throws java.io.IOException
f
- The file to which the table should be written.
java.io.IOException
- is thrown if any problems occur while the
file is being written.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - object to compare
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |