Class DefaultCommandFactory<C extends Command>
java.lang.Object
io.vertx.core.spi.launcher.DefaultCommandFactory<C>
- All Implemented Interfaces:
CommandFactory<C>
Default implementation of
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.- Author:
- Clement Escoffier invalid input: '<'[email protected]>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCommandFactory(Class<C> clazz) Deprecated.DefaultCommandFactory(Class<C> clazz, Supplier<C> supplier) Creates a newCommandFactory. -
Method Summary
-
Constructor Details
-
DefaultCommandFactory
Deprecated.Please useDefaultCommandFactory(Class, Supplier)Creates a newCommandFactory.- Parameters:
clazz- theCommandimplementation
-
DefaultCommandFactory
-
-
Method Details
-
create
- Specified by:
createin interfaceCommandFactory<C extends Command>- Returns:
- a new instance of the command by invoking the default constructor of the given class.
-
define
Description copied from interface:CommandFactoryCreates a newCLIinstance.- Specified by:
definein interfaceCommandFactory<C extends Command>- Returns:
- the
CLIinstance by reading the annotation.
-
DefaultCommandFactory(Class, Supplier)