|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.multijava.util.Utils org.multijava.util.compiler.Compiler org.multijava.mjc.Main org.jmlspecs.jmlunit.Main
A class implementing the entry point of the JML/JUnit test oracle
generator.
Use java org.jmlspecs.jmlunit.Main --help
to get usage options.
Class Specifications |
Specifications inherited from class Main |
invariant this.taskQueue != null ==> ( \forall java.lang.Object o; this.taskQueue.contains(o); o instanceof org.multijava.mjc.Main.Task); private invariant ( \forall org.multijava.mjc.Main.Task t; t != null; t.sequenceID() == this.mainSequenceID <==> (* t does not belong to a task sequence used to * catch up recursively loaded files *)); private invariant ( \forall java.lang.Object o; this.currentlyParsingRelation.containsValue(o); o instanceof java.util.Set); private invariant ( \forall java.lang.Object o; this.failedParsingRelation.containsValue(o); o instanceof java.util.Set); private invariant ( \forall java.lang.Object o; this.alreadyParsedSet.contains(o); o instanceof java.lang.String); invariant this.appName != null; |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT; public represents _getClass <- \typeof(this); |
Specifications inherited from interface Constants |
invariant "junit.framework.".length() > 0 ==> "junit.framework.".charAt("junit.framework.".length()) == 46; invariant "org.jmlspecs.jmlrac.runtime.".length() > 0 ==> "org.jmlspecs.jmlrac.runtime.".charAt("org.jmlspecs.jmlrac.runtime.".length()) == 46; invariant "org.jmlspecs.jmlunit.".length() > 0 ==> "org.jmlspecs.jmlunit.".charAt("org.jmlspecs.jmlunit.".length()) == 46; invariant "org.jmlspecs.jmlunit.strategies.".length() > 0 ==> "org.jmlspecs.jmlunit.strategies.".charAt("org.jmlspecs.jmlunit.".length()) == 46; |
Specifications inherited from interface Constants |
public invariant true; |
Nested Class Summary | |
class |
Main.TestClassGenerationTask
A task for generating JML/JUnit test oracle classes. |
Nested classes 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 |
Model Field Summary |
Model fields inherited from class java.lang.Object |
_getClass, objectState, theString |
Ghost Field Summary |
Ghost fields inherited from class java.lang.Object |
objectTimesFinalized, owner |
Field Summary | |
static int |
PRI_TEST_CLASS_GENERATION
The task priority for generating test class. |
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 org.jmlspecs.jmlunit.Constants |
DOT_JAVA, PKG_JMLRAC, PKG_JMLUNIT, PKG_JUNIT, PKG_STRATEGIES, 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 oracles. |
Model Method Summary |
Model methods inherited from class java.lang.Object |
hashValue |
Method Summary | |
static boolean |
compile(String[] args)
Generates JML/JUnit test oracle classes with the given argument, args , and returns true if all the test
classes are successfully generated. |
static boolean |
compile(String[] args,
JntOptions opt,
OutputStream os)
Entry point for the GUI |
protected Main.Task |
createTaskAfter(Main.Task oldTask)
Returns the next task to be added to the task queue after the given task, oldTask , completes. |
(package private) static String |
genPackageName(JCompilationUnitType cunit,
JntOptions options)
|
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)
Get the warning filter's class name from the options structure. |
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). |
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_CLASS_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 all the test
classes are successfully generated.
public static boolean compile(String[] args, JntOptions opt, OutputStream os)
args
- the file, package, and directory namesopt
- the options for the toolos
- the output stream for the compiler messagesstatic String genPackageName(JCompilationUnitType cunit, JntOptions options)
protected MjcCommonOptions makeOptionsInstance()
makeOptionsInstance
in class Main
JntOptions
protected MjcCommonOptions getOptionsInstance(MjcCommonOptions opt)
getOptionsInstance
in class Main
protected String getWarningFilterNameFromOptions(MjcCommonOptions opts)
Main
getWarningFilterNameFromOptions
in class Main
protected Main.Task createTaskAfter(Main.Task oldTask)
oldTask
, completes.
createTaskAfter
in class Main
|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |