public abstract class OptionConfiguration extends ParameterConfiguration
JSAPAntTask
Constructor and Description |
---|
OptionConfiguration()
Creates a new OptionConfiguration.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredProperty(ParserProperty p)
Adds a property to the current list of properties for this option's
PropertyStringParser.
|
protected void |
createParentStatements(String objName,
PrintStream out)
Creates java source code to configure an option as specified in this
object.
|
boolean |
declaredListSeparator()
Returns a boolean indicating whether the list separator character has
been specified by the user.
|
boolean |
getIslist()
Returns a boolean indicating whether this option is a list.
|
char |
getListseparator()
Returns the list separator character for this option.
|
ParserProperty[] |
getParserProperties()
Returns an array of ParserProperties for this option's
PropertyStringParser, or null if no ParserProperties
are defined.
|
boolean |
getRequired()
Returns a boolean indicating whether this option is required.
|
String |
getStringparser()
Returns the classname of the StringParser for this option.
|
boolean |
hasProperties()
Returns a boolean indicating whether any ParserProperties are defined.
|
void |
setIslist(boolean isList)
Sets whether this option is a list.
|
void |
setListseparator(char listSeparator)
Sets the list separator for this option, if it is a list.
|
void |
setRequired(boolean required)
Sets whether this option is required.
|
void |
setStringparser(String stringParser)
Sets the StringParser for this option.
|
protected void |
setupStringParser(Option option)
Instantiates and configures A
StringParser according to this
configuration, and provides it to the
specified Option. |
addConfiguredDefault, createMethod, getDefaults, getId, getParameter, setDefault, setId
public OptionConfiguration()
public void setStringparser(String stringParser)
stringParser
- the StringParser for this option.public String getStringparser()
public void setRequired(boolean required)
required
- if true, this option is required.public boolean getRequired()
public void setIslist(boolean isList)
isList
- if true, this option is a list.public boolean getIslist()
public void setListseparator(char listSeparator)
listSeparator
- the list separator character for this option, if it
is a list.public char getListseparator()
public boolean declaredListSeparator()
public void addConfiguredProperty(ParserProperty p)
p
- the property to add.public ParserProperty[] getParserProperties()
public boolean hasProperties()
hasProperties
in class ParameterConfiguration
protected void setupStringParser(Option option)
StringParser
according to this
configuration, and provides it to the
specified Option.option
- the Option that should use the configured StringParser.protected void createParentStatements(String objName, PrintStream out)
createParentStatements
in class ParameterConfiguration
objName
- the name of the object in the generated source codeout
- a PrintStream to which the source code should be writtenCopyright © 2016. All rights reserved.