|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ohrasys.cad.bnf.BNFAbstractTest
public abstract class BNFAbstractTest
Abstract Backus-Naur test. This is the base for all the concrete test implementations in this package.
| Field Summary | |
|---|---|
protected java.util.List<java.lang.Object> |
collectedData
The list containing data collected by this test |
protected boolean |
collecting
A flag indicating whether data collection is turned on |
protected java.util.List<BNFTestableObject> |
committed
A list of all subtokens successfully processed by the sub-tests |
protected boolean |
formatting
|
protected static com.ohrasys.cad.bnf.BNFI18NFactory |
i18n
The internationalized string factory |
protected int |
nextTest
A pointer to the sub-test being evaluated |
protected java.util.List<BNFTestableObject> |
playable
A list of tokens to be evaluated by this test |
protected BNFTestResult |
result
The result object for this test |
protected BNFTestImplementor[] |
tests
The list of sub-tests that comprise this test |
| Constructor Summary | |
|---|---|
BNFAbstractTest(BNFTestImplementor[] tests)
Creates a new BNFAbstractTest object. |
|
| Method Summary | |
|---|---|
protected void |
checkTests()
A method to check the sub-tests that comprise this test |
java.lang.Object |
collect()
A method to retrieve data collected during the evaluation of this test |
protected boolean |
isFirstTest()
A method to determine if the test is evaluating the first sub-test |
protected boolean |
isLastTest()
A method to determine if the test is evaluating the last sub-test |
protected boolean |
isNotLastTest()
A method to determine if the test is evaluating a sub-test other than the last sub-test |
void |
reset()
Resets the test state |
void |
setCollecting(boolean isCollecting)
A method to turn on data collection |
void |
setFormatting(boolean isFormatting)
|
abstract BNFTestResult |
test(BNFTestableObject obj)
A method to evaluate this test using the supplied testable object. |
java.lang.String |
toString()
Returns a text representation of the test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static com.ohrasys.cad.bnf.BNFI18NFactory i18n
protected java.util.List<java.lang.Object> collectedData
protected boolean collecting
protected boolean formatting
protected java.util.List<BNFTestableObject> committed
protected int nextTest
protected java.util.List<BNFTestableObject> playable
protected BNFTestResult result
protected BNFTestImplementor[] tests
| Constructor Detail |
|---|
public BNFAbstractTest(BNFTestImplementor[] tests)
throws BNFTestException
tests - The list of sub-tests that comprise this test.
BNFTestException - If the list of sub-tests is null, empty or
contains null sub-tests.| Method Detail |
|---|
public abstract BNFTestResult test(BNFTestableObject obj)
test in interface BNFTestImplementorobj - The testable object from which to extract the token
public java.lang.Object collect()
collect in interface BNFTestImplementorpublic void reset()
reset in interface BNFTestImplementorpublic void setCollecting(boolean isCollecting)
setCollecting in interface BNFTestImplementorisCollecting - true if data should be collecting during test
evaluationpublic void setFormatting(boolean isFormatting)
setFormatting in interface BNFTestImplementorpublic java.lang.String toString()
toString in class java.lang.Object
protected void checkTests()
throws BNFTestException
BNFTestException - If the sub-test list is null, zero length
or contains a null sub-testprotected boolean isFirstTest()
protected boolean isLastTest()
protected boolean isNotLastTest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||