public class ConstructorAndPublicMethodsCliObjectFactory<T> extends PublicMethodsCliObjectFactory<T>
Options from the constructor and public methods in a class.
For method inference, see PublicMethodsCliObjectFactory.
Options are inferred from the constructor as follows:
1. The helper will search for exactly one constructor with only String arguments and which is annotated with
CliObjectSupport.
2. For each parameter of the constructor, the helper will create a required Option.CliObjectFactory.HelpArgumentFoundklazz| Constructor and Description |
|---|
ConstructorAndPublicMethodsCliObjectFactory(Class<? extends T> klazz) |
| Modifier and Type | Method and Description |
|---|---|
T |
constructObject(org.apache.commons.cli.CommandLine cli) |
org.apache.commons.cli.Options |
getOptions() |
applyCommandLineOptions, buildObject, buildObject, getUsageStringpublic T constructObject(org.apache.commons.cli.CommandLine cli) throws IOException
constructObject in class PublicMethodsCliObjectFactory<T>IOExceptionpublic org.apache.commons.cli.Options getOptions()
Options understood by this factory.