T
- the request typeprivate static class Test.DomainSimple<T extends Request> extends Test.BaseOperation
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
opName
the operation name
|
private java.util.function.BiFunction<java.lang.String,java.lang.String,T> |
requestFactory
the request factory
|
Constructor and Description |
---|
DomainSimple(java.lang.String name,
java.util.function.BiFunction<java.lang.String,java.lang.String,T> factory)
constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
return the name of the operation
|
Test.Command |
parse(Test.Arguments args,
java.io.PrintWriter pw)
create a command from the arguments; note that in case of errors,
no help shall be printed (i.e. call to
Test.Operation.printHelp(java.io.PrintWriter) |
protected T |
parseData(Test.Arguments args,
java.io.PrintWriter pw)
parse the arguments
|
void |
printHelp(java.io.PrintWriter pw)
print the help for the operation; the output shall not exceed
80 characters per line
|
parseMultipleValueOption, parseSingleIntValueOption, parseSingleValueOption, printRepeatedOptionError
public DomainSimple(java.lang.String name, java.util.function.BiFunction<java.lang.String,java.lang.String,T> factory)
name
- the operation namefactory
- the factoryprotected T parseData(Test.Arguments args, java.io.PrintWriter pw)
args
- the argumentspw
- the print writer to use for error outputnull
if the arguments
could not be parsedpublic java.lang.String getName()
public void printHelp(java.io.PrintWriter pw)
pw
- the print writer to usepublic Test.Command parse(Test.Arguments args, java.io.PrintWriter pw)
Test.Operation.printHelp(java.io.PrintWriter)
args
- the argumentspw
- the print writer to use for error outputnull
if the arguments
could not be parsedCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH