|
||||||||||
| 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(java.lang.String shortPrefix,
java.lang.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(java.lang.String newDescription)
Use this option description |
DefaultOptionBuilder |
withId(int newId)
Sets the id |
DefaultOptionBuilder |
withLongName(java.lang.String longName)
Use this long option name. |
DefaultOptionBuilder |
withRequired(boolean newRequired)
Use this optionality |
DefaultOptionBuilder |
withShortName(java.lang.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(java.lang.String shortPrefix,
java.lang.String longPrefix,
boolean burstEnabled)
throws java.lang.IllegalArgumentException
shortPrefix - the prefix to use for short optionslongPrefix - the prefix to use for long optionsburstEnabled - whether to allow gnu style bursting
java.lang.IllegalArgumentException - if either prefix is less than on
character long| Method Detail |
|---|
public DefaultOption create()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if no names have been suppliedpublic DefaultOptionBuilder reset()
DefaultOptionBuilder.public DefaultOptionBuilder withShortName(java.lang.String shortName)
shortName - the name to use
public DefaultOptionBuilder withLongName(java.lang.String longName)
longName - the name to use
public DefaultOptionBuilder withDescription(java.lang.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 | |||||||||