|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ode.utils.cli.MultiArgument
public class MultiArgument
A multiple argument commandline fragment that greedily consumes what's left on the commandline as arguments.
Field Summary |
---|
Fields inherited from interface org.apache.ode.utils.cli.CommandlineFragment |
---|
COMMAND_PREFIX |
Constructor Summary | |
---|---|
MultiArgument(java.lang.String argName,
java.lang.String description,
boolean optional)
|
Method Summary | |
---|---|
java.util.List<java.lang.String> |
consume(java.util.List<java.lang.String> s)
Grab the pieces of the commandline relevant to this argument, configure the implementation, and then return a new array of arguments that will have the pieces of the original commandline that this command used removed. |
java.lang.String |
getDescription()
Return a description of this commandline fragment. |
java.lang.String |
getUsage()
Construct a usage string for this commandline fragment. |
java.lang.String[] |
getValues()
|
boolean |
isOptional()
|
boolean |
isSet()
|
void |
reset()
Reset the fragment to its initial state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiArgument(java.lang.String argName, java.lang.String description, boolean optional)
Method Detail |
---|
public void reset()
CommandlineFragment
Reset the fragment to its initial state. This is useful for reusing fragments in multiple commandline structures.
reset
in interface CommandlineFragment
public java.util.List<java.lang.String> consume(java.util.List<java.lang.String> s) throws CommandlineSyntaxException
CommandlineFragment
Grab the pieces of the commandline relevant to this argument, configure the implementation, and then return a new array of arguments that will have the pieces of the original commandline that this command used removed.
consume
in interface CommandlineFragment
s
- the list of arguments
CommandlineSyntaxException
- if the commandline is structurally invalid.public boolean isOptional()
isOptional
in interface CommandlineFragment
true
if this fragment is optional.public boolean isSet()
public java.lang.String[] getValues()
public java.lang.String getUsage()
CommandlineFragment
Construct a usage string for this commandline fragment. The usage string is used when constructing a strawman commandline example and when formatting help.
getUsage
in interface CommandlineFragment
public java.lang.String getDescription()
CommandlineFragment
Return a description of this commandline fragment. The description should be a (short) narrative item that describes the purpose of the fragment. It is only used when formatting help.
getDescription
in interface CommandlineFragment
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |