|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.dpml.cli.builder.DefaultOptionBuilder
public class DefaultOptionBuilder
Builds DefaultOption instances.
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultOptionBuilder()
DefaultOption.DEFAULT_SHORT_PREFIX
,
DefaultOption.DEFAULT_LONG_PREFIX
,
DefaultOption.DEFAULT_BURST_ENABLED
public DefaultOptionBuilder(String shortPrefix, String longPrefix, boolean burstEnabled) throws IllegalArgumentException
shortPrefix
- the prefix to use for short optionslongPrefix
- the prefix to use for long optionsburstEnabled
- whether to allow gnu style bursting
IllegalArgumentException
- if either prefix is less than on
character longMethod Detail |
---|
public DefaultOption create() throws IllegalStateException
IllegalStateException
- if no names have been suppliedpublic DefaultOptionBuilder reset()
DefaultOptionBuilder
.public DefaultOptionBuilder withShortName(String shortName)
shortName
- the name to use
public DefaultOptionBuilder withLongName(String longName)
longName
- the name to use
public DefaultOptionBuilder withDescription(String newDescription)
newDescription
- the description to use
public DefaultOptionBuilder withRequired(boolean newRequired)
newRequired
- true iff the Option is required
public DefaultOptionBuilder withChildren(Group newChildren)
newChildren
- the child Group to use
public DefaultOptionBuilder withArgument(Argument newArgument)
newArgument
- the argument to use
public final DefaultOptionBuilder withId(int newId)
newId
- the id of the DefaultOption
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |