|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ode.utils.cli.Argument
org.apache.ode.utils.cli.LastArgument
public class LastArgument
A fragment implementation that picks-off the last argument on the line early.
For example, this would be a way to grab the destination directory of a UNIX
mv
command.
Field Summary |
---|
Fields inherited from interface org.apache.ode.utils.cli.CommandlineFragment |
---|
COMMAND_PREFIX |
Constructor Summary | |
---|---|
LastArgument(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. |
Methods inherited from class org.apache.ode.utils.cli.Argument |
---|
getDescription, getUsage, getValue, isOptional, isSet, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LastArgument(java.lang.String argName, java.lang.String description, boolean optional)
Method Detail |
---|
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
consume
in class Argument
s
- the list of arguments
CommandlineSyntaxException
- if the commandline is structurally invalid.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |