public class DefaultCommandFactory<C extends Command> extends Object implements CommandFactory<C>
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.| Constructor and Description |
|---|
DefaultCommandFactory(Class<C> clazz)
Creates a new
CommandFactory. |
| Modifier and Type | Method and Description |
|---|---|
C |
create(CommandLine cl) |
CLI |
define()
Creates a new
CLI instance. |
public DefaultCommandFactory(Class<C> clazz)
CommandFactory.clazz - the Command implementationpublic C create(CommandLine cl)
create in interface CommandFactory<C extends Command>public CLI define()
CommandFactoryCLI instance.define in interface CommandFactory<C extends Command>CLI instance by reading the annotation.Copyright © 2015. All rights reserved.