|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Compiler
org.multijava.mjc.Main
edu.utep.cs.utjml.rat.Main
public class Main
Provides the entry point to the JML/JUnit-based random test case
generator for Java classes. The tool takes a Java source file and
produces two JUnit test class files, one for test oracle and the
other for test data. Use java Main --help to get usage options.
| Nested Class Summary | |
|---|---|
static class |
Main.RatClassNotFoundException
Unchecked version of ClassNotFoundException. |
class |
Main.TestCaseGenerationTask
A task for generating test classes and test cases. |
| Nested classes/interfaces inherited from class org.multijava.mjc.Main |
|---|
Main.CheckInitializerTask, Main.CheckInterfaceTask, Main.ContextBehavior, Main.DFilter, Main.ExpectedGF, Main.ExpectedIndifferent, Main.ExpectedResult, Main.ExpectedType, Main.Filter, Main.ParseTask, Main.PreprocessTask, Main.PrettyPrintTask, Main.ResolveSpecializerTask, Main.ResolveTopMethodTask, Main.Task, Main.TaskTimes, Main.TranslateMJTask, Main.TreeProcessingTask, Main.Trees, Main.TypecheckTask |
| Field Summary | |
|---|---|
static int |
PRI_TEST_CASE_GENERATION
The task priority for generating test cases. |
| Fields inherited from class org.multijava.util.compiler.Compiler |
|---|
PRINT_TO_ERR, PRINT_TO_OUT |
| Fields inherited from class org.multijava.util.Utils |
|---|
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Fields inherited from interface edu.utep.cs.utjml.rat.Constants |
|---|
DOT_JAVA, PKG_JMLRAC, PKG_JMLUNIT, PKG_JUNIT, TEST_CLASS_FILE_NAME_POSTFIX, TEST_CLASS_NAME_POSTFIX, TEST_DATA_FILE_NAME_POSTFIX, TEST_DATA_NAME_POSTFIX, TEST_METHOD_NAME_PREFIX |
| Constructor Summary | |
|---|---|
Main()
Constructs an object for generating test cases. |
|
| Method Summary | |
|---|---|
static void |
addRatListener(RatListener l)
Adds the given observer to the list of listeners. |
static boolean |
compile(String[] args)
Generates JML/JUnit test cases with the given argument, args, and returns true if the test
cases are successfully generated. |
static boolean |
compile(String[] args,
RatListener listener,
OutputStream os)
Generates JML/JUnit test cases with the given argument, args, and returns true if the test
cases are successfully generated. |
protected Main.Task |
createTaskAfter(Main.Task oldTask)
Returns the next task to be added to the task queue after the given task, oldTask, completes. |
protected MjcCommonOptions |
getOptionsInstance(MjcCommonOptions opt)
Returns opt as an instance of MjcCommonOptions so
it can be assigned to the options variable in
mjc's Main. |
protected String |
getWarningFilterNameFromOptions(MjcCommonOptions opts)
|
static void |
main(String[] args)
An entry point when starting from the command line. |
protected MjcCommonOptions |
makeOptionsInstance()
This function creates an object to do the parsing of the command line arguments and to store the values of the flags and options so obtained (it does not actually do the argument parsing). |
static void |
removeRatListener(RatListener l)
Removes the given observer from the list of listeners. |
| Methods inherited from class org.multijava.util.compiler.Compiler |
|---|
getTimestamp, inform, inform, inform, inform, inform, inform, inform, inform, inform, modUtil, run, setOutputStream, verifyFiles, verifyFiles |
| Methods inherited from class org.multijava.util.Utils |
|---|
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRI_TEST_CASE_GENERATION
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void main(String[] args)
args - The command line argumentspublic static boolean compile(String[] args)
args, and returns true if the test
cases are successfully generated.
public static boolean compile(String[] args,
RatListener listener,
OutputStream os)
args, and returns true if the test
cases are successfully generated.
public static void addRatListener(RatListener l)
public static void removeRatListener(RatListener l)
protected MjcCommonOptions makeOptionsInstance()
org.multijava.mjc.Main so that we can instantiate
a RatOptions object, in order to parse some new options
specific to this compiler (cf. RatOptions.opt).
makeOptionsInstance in class MainRatOptionsprotected MjcCommonOptions getOptionsInstance(MjcCommonOptions opt)
MjcCommonOptions so
it can be assigned to the options variable in
mjc's Main. This is done so we can
access options that are only processed in
MjcCommonOptions.
getOptionsInstance in class Mainprotected String getWarningFilterNameFromOptions(MjcCommonOptions opts)
getWarningFilterNameFromOptions in class Mainprotected Main.Task createTaskAfter(Main.Task oldTask)
oldTask, completes.
also requires oldTask != null && oldTask.completed; ensures \result == null || (\result.sequenceID() == oldTask.sequenceID());
createTaskAfter in class Main
|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||