|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.martiansoftware.jsap.ant.ParameterConfiguration
Stores/provides configuration data common to switches, flaggedoptions, and unflaggedoptions nested inside a jsap ant task. For detailed information on using the jsap task, see the documentation for JSAPAntTask.
JSAPAntTask
Constructor Summary | |
ParameterConfiguration()
Creates a new ParameterConfiguration. |
Method Summary | |
void |
addConfiguredDefault(DefaultValue defaultValue)
Adds a configured default value to the current list of default values for this parameter. |
abstract void |
createMethod(String methodName,
PrintStream out)
Creates source code for a java method that creates a parameter matching this object's configuration. |
String[] |
getDefaults()
Returns an array of this parameter's default values, or a zero-length array if none exist. |
String |
getId()
Returns the unique ID for this parameter. |
abstract Parameter |
getParameter()
Returns an Parameter (String, FlaggedOption, or UnflaggedOption) configured according to the settings contained within this object. |
boolean |
hasProperties()
Returns a boolean indicating whether this parameter has any properties associated with its StringParser. |
void |
setDefault(String defaultValue)
Adds a default value to the current list of default values for this parameter. |
void |
setId(String id)
Sets the unique ID for this parameter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParameterConfiguration()
Method Detail |
public abstract Parameter getParameter()
public void setId(String id)
id
- ths unique ID for this parameter.public String getId()
public void setDefault(String defaultValue)
defaultValue
- the default value to add to the current list of
default values for this parameter.public void addConfiguredDefault(DefaultValue defaultValue)
defaultValue
- the configured default value to add to the current
list of default
values for this parameter.public String[] getDefaults()
public boolean hasProperties()
public abstract void createMethod(String methodName, PrintStream out) throws IOException
methodName
- the name of the java method to generate.out
- the PrintStream to which the generated source code should be
written.
IOException
- if any are thrown by PrintStream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |