com.martiansoftware.jsap.ant
Class SwitchConfiguration

java.lang.Object
  extended bycom.martiansoftware.jsap.ant.ParameterConfiguration
      extended bycom.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
SwitchConfiguration()
          Creates a new SwitchConfiguration.
 
Method Summary
 void createMethod(String methodName, PrintStream out)
          Creates java source code for a method that will instantiate and configure a Switch according to this configuration.
 String getLongflag()
          Returns the long flag for this switch.
 Parameter getParameter()
          Returns a Switch configured according to this configuration.
 char getShortflag()
          Returns the short flag for this switch.
 void setLongflag(String longFlag)
          Sets the long flag for this switch.
 void setShortflag(char shortFlag)
          Sets the short flag for this switch.
 
Methods inherited from class com.martiansoftware.jsap.ant.ParameterConfiguration
addConfiguredDefault, getDefaults, getId, hasProperties, setDefault, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwitchConfiguration

public SwitchConfiguration()
Creates a new SwitchConfiguration.

Method Detail

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(String longFlag)
Sets the long flag for this switch.

Parameters:
longFlag - the long flag for this switch.

getLongflag

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

Returns:
the long flag for this switch.

getParameter

public Parameter getParameter()
Returns a Switch configured according to this configuration.

Specified by:
getParameter in class ParameterConfiguration
Returns:
a Switch configured according to this configuration.

createMethod

public void createMethod(String methodName,
                         PrintStream out)
Creates java source code for a method that will instantiate and configure a Switch according to this configuration.

Specified by:
createMethod in class ParameterConfiguration
Parameters:
methodName - the name of the method to generate
out - the PrintStream to which the generated java will be written


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