Package com.martiansoftware.jsap.ant
Class UnflaggedOptionConfiguration
java.lang.Object
com.martiansoftware.jsap.ant.ParameterConfiguration
com.martiansoftware.jsap.ant.OptionConfiguration
com.martiansoftware.jsap.ant.UnflaggedOptionConfiguration
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createMethod
(String methodName, PrintStream out) Creates java source code for a method that instantiates an UnflaggedOption and configures it according to this configuration.boolean
Returns a boolean indicating whether this UnflaggedOption is greedy.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, createParentStatements, declaredListSeparator, getIslist, getListseparator, getParserProperties, getRequired, getStringparser, hasProperties, setIslist, setListseparator, setRequired, setStringparser, setupStringParser
Methods inherited from class com.martiansoftware.jsap.ant.ParameterConfiguration
addConfiguredDefault, getDefaults, getId, setDefault, setId
-
Constructor Details
-
UnflaggedOptionConfiguration
public UnflaggedOptionConfiguration()Creates a new UnflaggedOptionConfiguration.
-
-
Method Details
-
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
Returns an UnflaggedOption configured according to this configuration.- Specified by:
getParameter
in classParameterConfiguration
- Returns:
- an UnflaggedOption configured according to this configuration.
-
createMethod
Creates java source code for a method that instantiates an UnflaggedOption and configures it according to this configuration.- Specified by:
createMethod
in classParameterConfiguration
- Parameters:
methodName
- the name of the method to generateout
- the PrintStream to which the java source code will be written.
-