org.jcommando
Class JCommandoGen

java.lang.Object
  extended byorg.jcommando.JCommandParser
      extended byorg.jcommando.GeneratedParser
          extended byorg.jcommando.JCommandoGen

public final class JCommandoGen
extends GeneratedParser

This class generates a command parser based on an XML input file.

Author:
Brett Wooldridge

Field Summary
 
Fields inherited from class org.jcommando.JCommandParser
commands, commandsById, optionsById, optionsByLong, optionsByShort
 
Constructor Summary
JCommandoGen()
          Empty constructor.
 
Method Summary
 void doGenerate()
          Generate a parser from an XML command file.
 java.lang.String getClassName()
           
 java.lang.String getDestDir()
           
 java.lang.String getInputFile()
           
 java.lang.String getPackageName()
           
static void main(java.lang.String[] args)
          The "main" that generates the command parser.
 void setClassName(java.lang.String clazz)
          Set the classname.
 void setDestDir(java.lang.String dest)
          Set the destination directory.
 void setHelp()
          Call the super-class.
 void setInputFile(java.lang.String file)
          Set the source command file.
 void setPackageName(java.lang.String pkg)
          Set the package name.
 
Methods inherited from class org.jcommando.JCommandParser
addCommand, addOption, getOptionById, parse, printUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCommandoGen

public JCommandoGen()
Empty constructor.

Method Detail

main

public static void main(java.lang.String[] args)
The "main" that generates the command parser.

Parameters:
args - command line arguments

doGenerate

public void doGenerate()
Generate a parser from an XML command file.

Specified by:
doGenerate in class GeneratedParser

setDestDir

public void setDestDir(java.lang.String dest)
Set the destination directory.

Specified by:
setDestDir in class GeneratedParser
Parameters:
dest - the name of the destination directory

setInputFile

public void setInputFile(java.lang.String file)
Set the source command file.

Specified by:
setInputFile in class GeneratedParser
Parameters:
file - the name of the source file

setClassName

public void setClassName(java.lang.String clazz)
Set the classname.

Specified by:
setClassName in class GeneratedParser
Parameters:
clazz - the name of the parser class to generate

setPackageName

public void setPackageName(java.lang.String pkg)
Set the package name.

Specified by:
setPackageName in class GeneratedParser
Parameters:
pkg - the name of package the generated class should reside in

getClassName

public java.lang.String getClassName()
Returns:
Returns the className.

getDestDir

public java.lang.String getDestDir()
Returns:
Returns the destDir.

getInputFile

public java.lang.String getInputFile()
Returns:
Returns the inputFile.

getPackageName

public java.lang.String getPackageName()
Returns:
Returns the packageName.

setHelp

public void setHelp()
Call the super-class.

Specified by:
setHelp in class GeneratedParser