|
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.jmlspec.Main
A class implementing the entry point of the jmlspec specification
skeleton generator/comparator.
Use java org.jmlspecs.jmlspec.Main --help
to get usage options.
| Nested Class Summary | |
class |
Main.JspBinaryPrinterTask
|
class |
Main.JspCompareTask
A task for generating specification skeletons. |
class |
Main.JspParseTask
A task for generating specification skeletons. |
class |
Main.JspPrettyPrinterTask
A task for generating specification skeletons. |
(package private) static class |
Main.SuffixFilter
This class is used with the Directory.list method to list those files in a directory that this program is interested in processing - in this case, all those that end in a valid suffix. |
| 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 |
| Field Summary | |
(package private) static String[] |
also
|
protected static String[] |
annotation
|
(package private) ArrayList |
binaries
|
protected static String[] |
classAnnotation
|
(package private) static String[] |
comment
|
static int |
javaSuffixIndex
|
(package private) Map |
map
Map of fully-qualified class names (/-separated) to the arrays of ASTs that hold the parsed versions of all of the refinement files. |
(package private) static String[] |
nocomment
|
static int |
PRI_SKELETON_GENERATION
The task priority for generating test class. |
static String[] |
validSuffixes
Valid suffixes for specification files. |
| 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()
|
|
| Method Summary | |
String |
checkPackageName(String packageName,
boolean quiet)
Checks whether a syntactically valid package name actually exists, and returns the directory location of the root of the package or null if there is no package by that name on the sourcepath or classpath. |
static boolean |
compile(String[] args)
Generates JML skeleton with the given argument, args, and returns true if all the
skeletons are successfully generated. |
static boolean |
compile(String[] args,
JspOptions opt,
OutputStream os)
Entry point for the GUI |
protected Main.Task |
createTaskAfter(Main.Task oldTask)
Adds JspPrettyPrinterTask or JspCompareTask after the regular parsing. |
void |
doBinaries()
|
protected FilenameFilter |
filenameFilter()
This filter returns all the files that are processed when a directory or package is named on the command-line. |
(package private) File |
findFile(String qname,
String suffix)
|
static int |
findSuffixIndex(String s)
Generates an int corresponding to the suffix; no particular order, just has to be unique - used as the index into an array. |
Main.ParseTask |
firstTask(ArrayList infiles)
Generates the first task in the compilation sequence. |
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. |
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. |
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). |
protected boolean |
runInitialization(String[] args)
Invoked from within the method run to do the argument parsing and compiler setup prior to actually parsing files via the task mechanism; returns true if no errors are encountered during initialization; if false is returned the initialization is not necessarily complete. |
protected void |
runSetInitialTasks(ArrayList infiles)
Sets up the initial tasks that start the parsing. |
void |
setTemplates(JspOptions options)
|
| 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 |
ArrayList binaries
Map map
public static final int PRI_SKELETON_GENERATION
public static final String[] validSuffixes
public static final int javaSuffixIndex
protected static String[] annotation
protected static String[] classAnnotation
static final String[] nocomment
static final String[] comment
static final String[] also
| 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
skeletons are successfully generated.
public static boolean compile(String[] args,
JspOptions opt,
OutputStream os)
args - the file, package, and directory namesopt - the options for the toolos - the output stream for the compiler messagesprotected boolean runInitialization(String[] args)
Main
runInitialization in class Main
public void handlePackages(ArrayList packages,
ArrayList dirs,
ArrayList infiles)
Main
handlePackages in class Main
public String checkPackageName(String packageName,
boolean quiet)
Main
checkPackageName in class Mainprotected FilenameFilter filenameFilter()
filenameFilter in class Mainprotected MjcCommonOptions makeOptionsInstance()
makeOptionsInstance in class MainJspOptionsprotected MjcCommonOptions getOptionsInstance(MjcCommonOptions opt)
getOptionsInstance in class Mainprotected String getWarningFilterNameFromOptions(MjcCommonOptions opts)
Main
getWarningFilterNameFromOptions in class Mainpublic Main.ParseTask firstTask(ArrayList infiles)
Mainrequires infiles != null && (\forall Object o; infiles.contains(o); o instanceof String);
firstTask in class Mainprotected void runSetInitialTasks(ArrayList infiles)
Main
runSetInitialTasks in class Mainprotected Main.Task createTaskAfter(Main.Task oldTask)
createTaskAfter in class Mainpublic void doBinaries()
File findFile(String qname,
String suffix)
public static int findSuffixIndex(String s)
public void setTemplates(JspOptions options)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||