com.martiansoftware.jsap.ant
Class FlaggedOptionConfiguration

java.lang.Object
  extended bycom.martiansoftware.jsap.ant.ParameterConfiguration
      extended bycom.martiansoftware.jsap.ant.OptionConfiguration
          extended bycom.martiansoftware.jsap.ant.FlaggedOptionConfiguration

public class FlaggedOptionConfiguration
extends OptionConfiguration

Stores/provides configuration data for flaggedoptions nested inside a jsap ant task. For detailed information on using the jsap task, see the documentation for JSAPAntTask.

Author:
Marty Lamb
See Also:
JSAPAntTask, FlaggedOption

Constructor Summary
FlaggedOptionConfiguration()
          Creates a new FlaggedOptionConfiguration.
 
Method Summary
 void createMethod(String methodName, PrintStream out)
          Creates source code for a java method that will instantiate a FlaggedOption matching this configuration.
 String getLongflag()
          Returns the long flag for this option.
 Parameter getParameter()
          Returns a FlaggedOption preconfigured according to this configuration.
 char getShortflag()
          Returns the short flag for this option.
 void setAllowmultipledeclarations(boolean allowMultipleDeclarations)
          Specifies whether this option can be declared multiple times on the same command line.
 void setLongflag(String longFlag)
          Sets the long flag for this option.
 void setShortflag(char shortFlag)
          Sets the short flag for this option.
 
Methods inherited from class com.martiansoftware.jsap.ant.OptionConfiguration
addConfiguredProperty, declaredListSeparator, getIslist, getListseparator, getParserProperties, getRequired, getStringparser, hasProperties, setIslist, setListseparator, setRequired, setStringparser
 
Methods inherited from class com.martiansoftware.jsap.ant.ParameterConfiguration
addConfiguredDefault, getDefaults, getId, setDefault, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlaggedOptionConfiguration

public FlaggedOptionConfiguration()
Creates a new FlaggedOptionConfiguration.

Method Detail

setShortflag

public void setShortflag(char shortFlag)
Sets the short flag for this option.

Parameters:
shortFlag - the short flag for this option.

getShortflag

public char getShortflag()
Returns the short flag for this option.

Returns:
the short flag for this option.

setLongflag

public void setLongflag(String longFlag)
Sets the long flag for this option.

Parameters:
longFlag - the long flag for this option.

getLongflag

public String getLongflag()
Returns the long flag for this option.

Returns:
the long flag for this option.

setAllowmultipledeclarations

public void setAllowmultipledeclarations(boolean allowMultipleDeclarations)
Specifies whether this option can be declared multiple times on the same command line.

Parameters:
allowMultipleDeclarations - if true, this option can be declared multiple times on the same command line.

getParameter

public Parameter getParameter()
Returns a FlaggedOption preconfigured according to this configuration.

Specified by:
getParameter in class ParameterConfiguration
Returns:
a FlaggedOption preconfigured according to this configuration.

createMethod

public void createMethod(String methodName,
                         PrintStream out)
Creates source code for a java method that will instantiate a FlaggedOption matching this configuration.

Specified by:
createMethod in class ParameterConfiguration
Parameters:
methodName - the name of the method to create
out - the PrintStream to which the java source for the method should be written.


Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap