ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

javafe
Class SrcToolOptions

java.lang.Object
  extended byjavafe.Options
      extended byjavafe.SrcToolOptions
Direct Known Subclasses:
CopyLoadedOptions, Options, TestTool.Options

public class SrcToolOptions
extends Options

This class holds the command-line options specific to the SrcTool class.


Field Summary
static boolean allowAvoidSpec
          Do we allow the -avoidSpec option?
static boolean allowDepend
          Do we allow the -depend option?
 boolean avoidSpec
          Should we avoid specs for all types loaded after the initial set of source files?
 boolean processRecursively
          Should we process files recursively?
 
Fields inherited from class javafe.Options
assertionsEnabled, assertIsKeyword, currentdir, eol, fileOrigin, inputEntries, issueUsage, NEVER_BINARY, NEVER_SOURCE, noCautions, PREFER_BINARY, PREFER_RECENT, PREFER_SOURCE, privateOptionData, publicOptionData, quiet, showErrorLocation, sysPath, testMode, userPath, userSourcePath, v
 
Constructor Summary
SrcToolOptions()
           
 
Method Summary
 int processOption(java.lang.String option, java.lang.String[] args, int offset)
          The list of filenames on the command line; this Vector is aliased with a variable in SrcTool.
 java.lang.String showNonOptions()
          Print non-option usage info to System.err.
 java.lang.String showOptions(boolean all)
          Print option information to System.err.
 
Methods inherited from class javafe.Options
checkMoreArguments, format, processFileOfArgs, processOptions, processOptionsLoop, showOptionArray, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowAvoidSpec

public static boolean allowAvoidSpec
Do we allow the -avoidSpec option? Defaults to yes.


allowDepend

public static boolean allowDepend
Do we allow the -depend option? Defaults to yes.


avoidSpec

public boolean avoidSpec
Should we avoid specs for all types loaded after the initial set of source files?

Defaults to false. Set by using the -avoidSpec option.

Note: if processRecursively is set, then we always avoid specs.


processRecursively

public boolean processRecursively
Should we process files recursively? Defaults to no, can be set by a sub-class, or the -depend option.

Warning: this needs to be set before option processing is finished!

Constructor Detail

SrcToolOptions

public SrcToolOptions()
Method Detail

processOption

public int processOption(java.lang.String option,
                         java.lang.String[] args,
                         int offset)
                  throws UsageError
The list of filenames on the command line; this Vector is aliased with a variable in SrcTool.

Overrides:
processOption in class Options
Parameters:
option - the option currently being handled. An option always starts with a '-' character, and the remaining command-line arguments (not counting option) (args[offset],...,args[args.length-1]).
args - the command-line arguments that are being processed.
offset - the offset into the args array that indicates which option is currently being dealt with.
Returns:
The offset to any remaining command-line arguments should be returned. (This allows the option to consume some or all of the following arguments.)
Throws:
UsageError - If the option is erroneous, throw an UsageError exception with a string describing the problem.

showNonOptions

public java.lang.String showNonOptions()
Print non-option usage info to System.err. Output must include at least one newline.

Overrides:
showNonOptions in class Options
Returns:
non-option usage information in a string.

showOptions

public java.lang.String showOptions(boolean all)
Print option information to System.err. Each printed line should be preceeded by two blank spaces.

Each overriding method should first call super.showOptions().

Overrides:
showOptions in class Options
Parameters:
all - if true, then all options are printed, including experimental options; otherwise, just the options expected to be used by standard users are printed.
Returns:
a String containing all option information ready for output.

ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage