Package com.martiansoftware.jsap.ant
Class SwitchConfiguration
java.lang.Object
com.martiansoftware.jsap.ant.ParameterConfiguration
com.martiansoftware.jsap.ant.SwitchConfiguration
public class SwitchConfiguration extends ParameterConfiguration
Stores/provides configuration data for switches 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,Switch
-
Constructor Summary
Constructors Constructor Description SwitchConfiguration()Creates a new SwitchConfiguration. -
Method Summary
Modifier and Type Method Description voidcreateMethod(java.lang.String methodName, java.io.PrintStream out)Creates java source code for a method that will instantiate and configure a Switch according to this configuration.java.lang.StringgetLongflag()Returns the long flag for this switch.ParametergetParameter()Returns a Switch configured according to this configuration.chargetShortflag()Returns the short flag for this switch.voidsetLongflag(java.lang.String longFlag)Sets the long flag for this switch.voidsetShortflag(char shortFlag)Sets the short flag for this switch.Methods inherited from class com.martiansoftware.jsap.ant.ParameterConfiguration
addConfiguredDefault, getDefaults, getId, hasProperties, setDefault, setIdMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SwitchConfiguration
public SwitchConfiguration()Creates a new SwitchConfiguration.
-
-
Method Details
-
setShortflag
public void setShortflag(char shortFlag)Sets the short flag for this switch.- Parameters:
shortFlag- the short flag for this switch.
-
getShortflag
public char getShortflag()Returns the short flag for this switch.- Returns:
- the short flag for this switch.
-
setLongflag
public void setLongflag(java.lang.String longFlag)Sets the long flag for this switch.- Parameters:
longFlag- the long flag for this switch.
-
getLongflag
public java.lang.String getLongflag()Returns the long flag for this switch.- Returns:
- the long flag for this switch.
-
getParameter
Returns a Switch configured according to this configuration.- Specified by:
getParameterin classParameterConfiguration- Returns:
- a Switch configured according to this configuration.
-
createMethod
public void createMethod(java.lang.String methodName, java.io.PrintStream out)Creates java source code for a method that will instantiate and configure a Switch according to this configuration.- Specified by:
createMethodin classParameterConfiguration- Parameters:
methodName- the name of the method to generateout- the PrintStream to which the generated java will be written
-