objectivehtml.ohtmlc
Class CompilerOption

java.lang.Object
  |
  +--objectivehtml.ohtmlc.CompilerOption

public class CompilerOption
extends java.lang.Object

This class represents a compiler option given on the command line.


Field Summary
static int MANDATORY_ARGS
          Indicates the number of mandatory command line arguments
static java.lang.String OPT_ABSTRACT
          The abstract option which indicates whether the generated class should be abstract
static java.lang.String OPT_ACCESSLEVEL
          The accesslevel option which indicates the accesslevel for all the member variables
static java.lang.String OPT_CHARSET
          The charset option which indicates the charset type to use when writing out to a file
static java.lang.String OPT_ENTITIES
          The entities option which indicates the entity numbers that should be entitized
static java.lang.String OPT_EXCEPTIONS
          The exceptions option which indicates what exceptions should be thrown by the constructor
static java.lang.String OPT_EXTENDS
          The extends option which indicates the class that this form should extend
static java.lang.String OPT_FORM
          The form option which indicates the form that is to be compiled (via ID attribute)
static java.lang.String OPT_IMPORTS
          The import option which indicates the packages or classes that this form should import
static java.lang.String OPT_NOCOMPRESS
          The nocompress option which indicates that text compression should not be used
static java.lang.String OPT_OUTPUT
          The output option which indicates the output file name
static java.lang.String OPT_PACKAGE
          The package option which indicates what package the generated class should be in
static java.lang.String OPT_SIGNALS
          The signals option which indicates what signals should be emitted by this form
static java.lang.String OPT_UNICODES
          The unicodes option which indicates the unicodes numbers that should be converted into unicode
static int OPTYPE_ONE
          This option type indicates an option with a one addtional argument (only one)
static int OPTYPE_ONE_MANY
          This option type indicates an option with a list (atleast one or more)
static int OPTYPE_ZERO
          This option type indicates an option with no additional arguments
static int OPTYPE_ZERO_ONE
          This option type indicates an option with a one addtional argument or none
 
Constructor Summary
CompilerOption(java.lang.String sOptionName, int nOptionType, int nMandatoryArgs, java.lang.String[] asCommandLineArgs)
          Constructs a new instance of CompilerOption with the specified data.
 
Method Summary
 boolean exists()
          Indicates whether the option exists.
 java.lang.String getOptionArg()
          Returns the first option argument
 java.util.Collection getOptionArgs()
          Returns all the arguments associated with this option.
 java.lang.String getOptionName()
          Returns the option name.
 int getOptionType()
          Returns the option type.
static java.util.Set parseNumbers(java.util.Collection clNumbers)
          Parses a list of String numbers into a Set of Integer objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_OUTPUT

public static final java.lang.String OPT_OUTPUT
The output option which indicates the output file name

OPT_FORM

public static final java.lang.String OPT_FORM
The form option which indicates the form that is to be compiled (via ID attribute)

OPT_ABSTRACT

public static final java.lang.String OPT_ABSTRACT
The abstract option which indicates whether the generated class should be abstract

OPT_PACKAGE

public static final java.lang.String OPT_PACKAGE
The package option which indicates what package the generated class should be in

OPT_EXCEPTIONS

public static final java.lang.String OPT_EXCEPTIONS
The exceptions option which indicates what exceptions should be thrown by the constructor

OPT_SIGNALS

public static final java.lang.String OPT_SIGNALS
The signals option which indicates what signals should be emitted by this form

OPT_EXTENDS

public static final java.lang.String OPT_EXTENDS
The extends option which indicates the class that this form should extend

OPT_ACCESSLEVEL

public static final java.lang.String OPT_ACCESSLEVEL
The accesslevel option which indicates the accesslevel for all the member variables

OPT_IMPORTS

public static final java.lang.String OPT_IMPORTS
The import option which indicates the packages or classes that this form should import

OPT_ENTITIES

public static final java.lang.String OPT_ENTITIES
The entities option which indicates the entity numbers that should be entitized

OPT_UNICODES

public static final java.lang.String OPT_UNICODES
The unicodes option which indicates the unicodes numbers that should be converted into unicode

OPT_CHARSET

public static final java.lang.String OPT_CHARSET
The charset option which indicates the charset type to use when writing out to a file

OPT_NOCOMPRESS

public static final java.lang.String OPT_NOCOMPRESS
The nocompress option which indicates that text compression should not be used

OPTYPE_ZERO

public static final int OPTYPE_ZERO
This option type indicates an option with no additional arguments

OPTYPE_ONE

public static final int OPTYPE_ONE
This option type indicates an option with a one addtional argument (only one)

OPTYPE_ZERO_ONE

public static final int OPTYPE_ZERO_ONE
This option type indicates an option with a one addtional argument or none

OPTYPE_ONE_MANY

public static final int OPTYPE_ONE_MANY
This option type indicates an option with a list (atleast one or more)

MANDATORY_ARGS

public static final int MANDATORY_ARGS
Indicates the number of mandatory command line arguments
Constructor Detail

CompilerOption

public CompilerOption(java.lang.String sOptionName,
                      int nOptionType,
                      int nMandatoryArgs,
                      java.lang.String[] asCommandLineArgs)
               throws InvalidCompilerOptionException
Constructs a new instance of CompilerOption with the specified data.
Parameters:
sOptionName - the name of the option to be represented
nOptionType - the option type for this option
nMandatoryArgs - the number of mandatory arguments
asCommandLineArgs - the array of command line options from the main method
Throws:
InvalidCompilerOptionException - if the option is not valid
Method Detail

exists

public boolean exists()
Indicates whether the option exists.
Returns:
true if the option exists, false otherwise

getOptionName

public java.lang.String getOptionName()
Returns the option name.
Returns:
the option name

getOptionType

public int getOptionType()
Returns the option type.
Returns:
the option type

getOptionArg

public java.lang.String getOptionArg()
Returns the first option argument
Returns:
the first option argument

getOptionArgs

public java.util.Collection getOptionArgs()
Returns all the arguments associated with this option.
Returns:
the option arguments

parseNumbers

public static final java.util.Set parseNumbers(java.util.Collection clNumbers)
                                        throws java.lang.NumberFormatException
Parses a list of String numbers into a Set of Integer objects.
Parameters:
clNumbers -  
Returns:
the set of numbers
Throws:
java.lang.NumberFormatException - if the numbers are invalid format