Package com.martiansoftware.jsap.ant
Class FlaggedOptionConfiguration
java.lang.Object
com.martiansoftware.jsap.ant.ParameterConfiguration
com.martiansoftware.jsap.ant.OptionConfiguration
com.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
Constructors Constructor Description FlaggedOptionConfiguration()Creates a new FlaggedOptionConfiguration. -
Method Summary
Modifier and Type Method Description voidcreateMethod(java.lang.String methodName, java.io.PrintStream out)Creates source code for a java method that will instantiate a FlaggedOption matching this configuration.java.lang.StringgetLongflag()Returns the long flag for this option.ParametergetParameter()Returns a FlaggedOption preconfigured according to this configuration.chargetShortflag()Returns the short flag for this option.voidsetAllowmultipledeclarations(boolean allowMultipleDeclarations)Specifies whether this option can be declared multiple times on the same command line.voidsetLongflag(java.lang.String longFlag)Sets the long flag for this option.voidsetShortflag(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, setStringparserMethods inherited from class com.martiansoftware.jsap.ant.ParameterConfiguration
addConfiguredDefault, getDefaults, getId, setDefault, setIdMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FlaggedOptionConfiguration
public FlaggedOptionConfiguration()Creates a new FlaggedOptionConfiguration.
-
-
Method Details
-
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(java.lang.String longFlag)Sets the long flag for this option.- Parameters:
longFlag- the long flag for this option.
-
getLongflag
public java.lang.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
Returns a FlaggedOption preconfigured according to this configuration.- Specified by:
getParameterin classParameterConfiguration- Returns:
- a FlaggedOption preconfigured according to this configuration.
-
createMethod
public void createMethod(java.lang.String methodName, java.io.PrintStream out)Creates source code for a java method that will instantiate a FlaggedOption matching this configuration.- Specified by:
createMethodin classParameterConfiguration- Parameters:
methodName- the name of the method to createout- the PrintStream to which the java source for the method should be written.
-