io.dropwizard.cli.EnvironmentCommand Java Examples
The following examples show how to use
io.dropwizard.cli.EnvironmentCommand.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommandSupport.java From dropwizard-guicey with MIT License | 5 votes |
/** * Inject dependencies into all registered environment commands. (only field and setter injection could be used) * There is no need to process other commands, because only environment commands will run bundles and so will * start the injector. * * @param commands registered commands * @param injector guice injector object */ public static void initCommands(final List<Command> commands, final Injector injector) { if (commands != null) { for (Command cmd : commands) { if (cmd instanceof EnvironmentCommand) { injector.injectMembers(cmd); } } } }
Example #2
Source File: CommandItemInfoImpl.java From dropwizard-guicey with MIT License | 4 votes |
@Override public boolean isEnvironmentCommand() { return EnvironmentCommand.class.isAssignableFrom(getType()); }