|
JML | ||||||||||
| 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
org.jmlspecs.checker.Main
org.jmlspecs.jmldoc.jmldoc_142.Main
This class implements the entry point of the JML compiler. Use
java org.jmlspecs.checker.Main --help to get usage
options.
| Nested Class Summary | |
class |
Main.JmlHtmlTask
This class jmlizes java files for each listed java file. |
static class |
Main.JmlPrivacyChecker
|
class |
Main.MjdocTask
This class drives the generation of html files. |
| Nested classes inherited from class org.jmlspecs.checker.Main |
Main.JmlCheckAssignableTask, Main.JmlParseTask, Main.JmlTypecheckTask |
| 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.ParseTask, Main.PreprocessTask, Main.PrettyPrintTask, Main.ResolveSpecializerTask, Main.ResolveTopMethodTask, Main.Task, Main.TaskTimes, Main.TranslateMJTask, Main.TreeProcessingTask, Main.Trees, Main.TypecheckTask |
| Field Summary | |
protected JmlHtmlFactory |
htmlGenerator
This object is used to generate html files. |
protected ArrayList |
packageList
|
| Fields inherited from class org.jmlspecs.checker.Main |
jmlOptions, refinedFileSequenceSet |
| 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 |
| Constructor Summary | |
|
Main()
The principal constructor for an object to do the work of the Jml compiler. |
protected |
Main(ModifierUtility modUtil)
Construct a JML compiler (an object of Main) that
uses the given ModifierUtility. |
| Method Summary | |
protected void |
addRecursivePackages(String packageName,
File dir,
ArrayList dirs)
This adds all subdirectories (recursively) as packages to be processed. |
static boolean |
compile(String[] args)
Second entry point. |
static boolean |
compile(String[] args,
JmldocOptions opt,
OutputStream os)
Entry point for the GUI |
protected Main.Task |
createTaskAfter(Main.Task oldTask)
This method uses the dynamic type of oldTask along
with the command line options to determine what task to add to
the task queue after the given task completes. |
protected MjcCommonOptions |
getOptionsInstance(MjcCommonOptions opt)
Assigns opt to the local instance of RacOptions and returns opt as an instance of MjcCommonOptions so it can be assigned to the options variable in mjc's Main. |
protected void |
handleOptionInteractions()
Take care of some interactions among options. |
void |
handlePackages(ArrayList packages,
ArrayList dirs,
ArrayList infiles)
Processes all the package names found on the command-line, altering the list of directories or files as appropriate. |
(package private) static void |
init()
|
static void |
main(String[] args)
The entry point when starting this program 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). |
boolean |
parseArguments(String[] args,
ArrayList infiles)
Parses the argument list. |
boolean |
runParser(String[] args,
MjcCommonOptions opt,
ArrayList infiles)
Runs the argument parser only so the GUI can process options from the command line |
protected void |
taskQueueEmptied()
Implemented in jmldoc to cause the generation of all the html files by the appropriate call into the doclet api. |
| Methods inherited from class org.jmlspecs.checker.Main |
canStopSequenceBeforeAllPasses, catchUpRefinedFile, catchUpTask, classToGenerate, compile, createCompilationUnitContext, exposeOptions, filenameFilter, firstTask, firstTask, getDefaultFilter, getWarningFilterNameFromOptions, hasOptionXobspure, hasOptionXsymr, hasOptionXsymw, hasUnsafeOpWarningOption, includeAllRefinedCUnits, initialize, initSession, isCommandLineFile, isSpecOrJmlMode, jmlNoBodyOK, makeRelative |
| 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 |
protected ArrayList packageList
protected JmlHtmlFactory htmlGenerator
| Constructor Detail |
public Main()
protected Main(ModifierUtility modUtil)
Main) that
uses the given ModifierUtility. This constructor
allows the subclasses to have their own version of modifier
utilities.
| Method Detail |
public static void main(String[] args)
args - the command line argumentspublic static boolean compile(String[] args)
public boolean runParser(String[] args,
MjcCommonOptions opt,
ArrayList infiles)
runParser in class Main
public static boolean compile(String[] args,
JmldocOptions opt,
OutputStream os)
args - the file, package, and directory namesopt - the options for the toolos - the output stream for the compiler messagesstatic void init()
protected MjcCommonOptions makeOptionsInstance()
makeOptionsInstance in class MainJmlOptionsprotected MjcCommonOptions getOptionsInstance(MjcCommonOptions opt)
getOptionsInstance in class Main
public boolean parseArguments(String[] args,
ArrayList infiles)
parseArguments in class Mainprotected void handleOptionInteractions()
public void handlePackages(ArrayList packages,
ArrayList dirs,
ArrayList infiles)
Main
handlePackages in class Main
protected void addRecursivePackages(String packageName,
File dir,
ArrayList dirs)
protected Main.Task createTaskAfter(Main.Task oldTask)
MainoldTask along
with the command line options to determine what task to add to
the task queue after the given task completes.
also requires oldTask != null && oldTask.completed; ensures \result == null || (\result.sequenceID() == oldTask.sequenceID());
createTaskAfter in class Mainprotected void taskQueueEmptied()
#run(String[]) when all reentrant
invocations of #processTaskQueue() have been exited and
in this implementation the method finalizes the generation of
the HTML. This method should be overridden by subclasses to
perform final work after completion of all tasks.
taskQueueEmptied in class Main
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||