public class TagTestFinder extends TestFinder
TestFinderTestFinder.ErrorHandler, TestFinder.Faultdebug, env| Constructor and Description |
|---|
TagTestFinder()
Constructs the list of file names to exclude for pruning in the search
for files to examine for test descriptions.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
isExcluded(java.lang.String s)
Determine if the given extension is excluded from scanning.
|
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.
|
void |
unexclude(java.lang.String name)
Undo an exclude operation.
|
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, setRootpublic TagTestFinder()
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 unexclude(java.lang.String name)
name - The filename to stop ignoring, should never be null.exclude(java.lang.String),
isExcluded(String)public boolean isExcluded(java.lang.String s)
s - The extension to check for (should not contain the leading dot)exclude(java.lang.String),
exclude(java.lang.String[]),
unexclude(String)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 questionpublic 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 scanprotected 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.Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.