|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.javatest.TestFinder
com.sun.javatest.finder.TagTestFinder
public class TagTestFinder
This class searches out test descriptions found in a file system tree. Each attribute of the test description consists of JavaDoc-like tags which provide an tag-name and associated value. The associated test script for the test suite will interpret the values. All tags for a given test description must be within the same block comment. A file may contain multiple test descriptions.
TestFinder| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.javatest.TestFinder |
|---|
TestFinder.ErrorHandler, TestFinder.Fault |
| Field Summary |
|---|
| Fields inherited from class com.sun.javatest.TestFinder |
|---|
debug, env |
| Constructor Summary | |
|---|---|
TagTestFinder()
Constructs the list of file names to exclude for pruning in the search for files to examine for test descriptions. |
|
| Method Summary | |
|---|---|
void |
addExtension(java.lang.String extn,
java.lang.Class commentStreamClass)
Nominate a class to read files that have a particular extension. |
protected int |
decodeArg(java.lang.String[] args,
int i)
Decode the arg at a specified position in the arg array. |
void |
exclude(java.lang.String name)
Exclude all files with a particular name from being scanned. |
void |
exclude(java.lang.String[] names)
Exclude all files with particular names from being scanned. |
java.lang.Class |
getClassForExtension(java.lang.String extn)
Get the class used to handle an extension. |
protected java.io.File |
getCurrentFile()
Get the name of the file currently being scanned. |
java.lang.String |
getInitialTag()
Get the current value of the initial tag that is checked for in a test description. |
protected java.util.Map |
parseComment(java.lang.String comment,
java.io.File currFile)
Given a comment, find all tags of interest. |
void |
scan(java.io.File file)
Scan a file, looking for test descriptions and/or more files to scan. |
protected void |
scanFile(java.io.File file)
Scan a file, looking for comments and in the comments, for test description data. |
void |
setInitialTag(java.lang.String tag)
Set the initial tag to be checked for in a test description. |
| Methods inherited from class com.sun.javatest.TestFinder |
|---|
clearErrors, decodeAllArgs, error, error, error, foundFile, foundTestDescription, foundTestDescription, getComparator, getDefaultComparator, getErrorCount, getErrorHandler, getErrors, getFiles, getRoot, getRootDir, getTests, init, init, isFolder, lastModified, localizedError, normalize, processEntry, read, setComparator, setErrorHandler, setRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagTestFinder()
| Method Detail |
|---|
protected int decodeArg(java.lang.String[] args,
int i)
throws TestFinder.Fault
decodeArg in class TestFinderargs - The array of argumentsi - The next argument to be decoded.
TestFinder.Fault - If there is a problem with the value of the current arg,
such as a bad value to an option, the Fault exception can be
thrown. The exception should NOT be thrown if the current
arg is unrecognized: in that case, an implementation should
delegate the call to the supertype.public void scan(java.io.File file)
scan in class TestFinderfile - The file to scanprotected java.io.File getCurrentFile()
public void exclude(java.lang.String name)
name - The name of files to be excluded.public void exclude(java.lang.String[] names)
names - The names of files to be excluded.
public void addExtension(java.lang.String extn,
java.lang.Class commentStreamClass)
extn - The extension for which this class is to be usedcommentStreamClass - A class to read files of a particular extension.
The class must be a subtype of CommentStreampublic java.lang.Class getClassForExtension(java.lang.String extn)
extn - The extension in question
public void setInitialTag(java.lang.String tag)
tag - The tag to be checked for.getInitialTag()public java.lang.String getInitialTag()
setInitialTag(java.lang.String)protected void scanFile(java.io.File file)
file - The file to scan
protected java.util.Map parseComment(java.lang.String comment,
java.io.File currFile)
comment - The comment to be parsed.currFile - The name of the file currently being read.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||