net.dpml.cli.builder
public class DefaultOptionBuilder extends Object
Version: @PROJECT-VERSION@
Constructor Summary | |
---|---|
DefaultOptionBuilder()
Creates a new DefaultOptionBuilder using defaults | |
DefaultOptionBuilder(String shortPrefix, String longPrefix, boolean burstEnabled)
Creates a new DefaultOptionBuilder |
Method Summary | |
---|---|
DefaultOption | create()
Creates a DefaultOption instance |
DefaultOptionBuilder | reset()
Resets the builder. |
DefaultOptionBuilder | withArgument(Argument newArgument)
Use this Argument |
DefaultOptionBuilder | withChildren(Group newChildren)
Use this child Group |
DefaultOptionBuilder | withDescription(String newDescription)
Use this option description |
DefaultOptionBuilder | withId(int newId)
Sets the id
|
DefaultOptionBuilder | withLongName(String longName)
Use this long option name. |
DefaultOptionBuilder | withRequired(boolean newRequired)
Use this optionality |
DefaultOptionBuilder | withShortName(String shortName)
Use this short option name. |
See Also: DEFAULT_SHORT_PREFIX DEFAULT_LONG_PREFIX DEFAULT_BURST_ENABLED
Parameters: shortPrefix the prefix to use for short options longPrefix the prefix to use for long options burstEnabled whether to allow gnu style bursting
Throws: IllegalArgumentException if either prefix is less than on character long
Returns: the new instance
Throws: IllegalStateException if no names have been supplied
Returns: this DefaultOptionBuilder
.
Parameters: newArgument the argument to use
Returns: this builder
Parameters: newChildren the child Group to use
Returns: this builder
Parameters: newDescription the description to use
Returns: this builder
Parameters: newId the id of the DefaultOption
Returns: this DefaultOptionBuilder
Parameters: longName the name to use
Returns: this builder
Parameters: newRequired true iff the Option is required
Returns: this builder
Parameters: shortName the name to use
Returns: this builder