net.dpml.cli.builder
Class DefaultOptionBuilder
java.lang.Object
net.dpml.cli.builder.DefaultOptionBuilder
Builds DefaultOption instances.
DefaultOptionBuilder
public DefaultOptionBuilder(String shortPrefix,
String longPrefix,
boolean burstEnabled)
throws IllegalArgumentException
Creates a new DefaultOptionBuilder
shortPrefix
- the prefix to use for short optionslongPrefix
- the prefix to use for long optionsburstEnabled
- whether to allow gnu style bursting
create
public DefaultOption create()
throws IllegalStateException
Creates a DefaultOption instance
withId
public final DefaultOptionBuilder withId(int newId)
Sets the id
newId
- the id of the DefaultOption
- this DefaultOptionBuilder
withLongName
public DefaultOptionBuilder withLongName(String longName)
Use this long option name. The first name is used as the preferred
display name for the Command and then later names are used as aliases.
longName
- the name to use
withShortName
public DefaultOptionBuilder withShortName(String shortName)
Use this short option name. The first name is used as the preferred
display name for the Command and then later names are used as aliases.
shortName
- the name to use