com.martiansoftware.jsap.ant
Class UnflaggedOptionConfiguration

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

public class UnflaggedOptionConfiguration
extends OptionConfiguration

Stores/provides configuration data for unflaggedoptions 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, UnflaggedOption

Constructor Summary
UnflaggedOptionConfiguration()
          Creates a new UnflaggedOptionConfiguration.
 
Method Summary
 void createMethod(String methodName, PrintStream out)
          Creates java source code for a method that instantiates an UnflaggedOption and configures it according to this configuration.
 boolean getGreedy()
          Returns a boolean indicating whether this UnflaggedOption is greedy.
 Parameter getParameter()
          Returns an UnflaggedOption configured according to this configuration.
 void setGreedy(boolean greedy)
          Sets whether this UnflaggedOption should be greedy.
 
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

UnflaggedOptionConfiguration

public UnflaggedOptionConfiguration()
Creates a new UnflaggedOptionConfiguration.

Method Detail

setGreedy

public void setGreedy(boolean greedy)
Sets whether this UnflaggedOption should be greedy. (i.e., should consume the remaining unflaggedoptions from the command line.

Parameters:
greedy - if true, this UnflaggedOption should be greedy.

getGreedy

public boolean getGreedy()
Returns a boolean indicating whether this UnflaggedOption is greedy.

Returns:
a boolean indicating whether this UnflaggedOption is greedy.

getParameter

public Parameter getParameter()
Returns an UnflaggedOption configured according to this configuration.

Specified by:
getParameter in class ParameterConfiguration
Returns:
an UnflaggedOption configured according to this configuration.

createMethod

public void createMethod(String methodName,
                         PrintStream out)
Creates java source code for a method that instantiates an UnflaggedOption and configures it 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 java source code 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