CommandFactory. This implementation defines the CLI from the
given Command implementation (by reading the annotation). Then, Command instance are
created by calling an empty constructor on the given Command implementation.
| Modifier and Type | Field and Description |
|---|---|
| private final Class | |
| private final Supplier |
| Access | Constructor and Description |
|---|---|
| public | DefaultCommandFactory(Class<C>
the clazz)Command implementation
Deprecated
Please use
DefaultCommandFactory(Class, Supplier)
Creates a new |
| public | DefaultCommandFactory(Class<C>
the clazz, Supplier<C> Command implementationthe supplier)Command implementationCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public C | Returns: a new instance of the command by invoking the default constructor of the given class.Implements io.
|
| public CLI | Returns: theCLI instance by reading the annotation.Implements io. Creates a new |
| clazz | back to summary |
|---|---|
| private final Class<C> clazz | |
| supplier | back to summary |
|---|---|
| private final Supplier<C> supplier | |
| DefaultCommandFactory | back to summary |
|---|---|
| public DefaultCommandFactory(Class<C> clazz)
Deprecated Please use Creates a new
| |
| DefaultCommandFactory | back to summary |
|---|---|
| public DefaultCommandFactory(Class<C> clazz, Supplier<C> supplier) Creates a new | |
| create | back to summary |
|---|---|
| public C create(CommandLine cl) Implements io.
| |
| define | back to summary |
|---|---|
| public CLI define() Implements io. Doc from io. Creates a new | |