| Constructor and Description |
|---|
CliFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <O> Cli<O> |
createCli(Class<O> klass)
Construct a Cli from an annotated interface definition
|
static <O> Cli<O> |
createCliUsingInstance(O options)
Construct a Cli from an annotated class
|
static <O> O |
parseArguments(Class<O> klass,
String... arguments)
Parse arguments from an annotated interface definition
|
static <O> O |
parseArgumentsUsingInstance(O options,
String... arguments)
Parse arguments from an annotated class instance
|
public static <O> Cli<O> createCli(Class<O> klass) throws InvalidOptionSpecificationException
O - The type of the interface that will be used to present the
argumentsklass - The annotated interface definitionArgumentValidationException - the arguments do not meet the CLI specificationInvalidOptionSpecificationException - the CLI specification is not validpublic static <O> Cli<O> createCliUsingInstance(O options) throws InvalidOptionSpecificationException
O - The type of the class used to present the argumentsoptions - The annotated classArgumentValidationException - the arguments do not meet the CLI specificationInvalidOptionSpecificationException - the CLI specification is not validpublic static <O> O parseArguments(Class<O> klass, String... arguments) throws ArgumentValidationException, InvalidOptionSpecificationException
O - The type of the interface that will be used to present the
argumentsklass - The annotated interface definitionarguments - ArgumentValidationException - the arguments do not meet the CLI specificationInvalidOptionSpecificationException - the CLI specification is not validpublic static <O> O parseArgumentsUsingInstance(O options,
String... arguments)
throws ArgumentValidationException,
InvalidOptionSpecificationException
O - The type of the class used to present the argumentsklass - The annotated interface definitionarguments - ArgumentValidationException - the arguments do not meet the CLI specificationInvalidOptionSpecificationException - the CLI specification is not validCopyright © 2006-2014 lexicalscope. All Rights Reserved.