public BQCoreModuleExtender addCommand(Command command) { contributeCommands().addBinding().toInstance(command); return this; }
public BQCoreModuleExtender addCommand(Class<? extends Command> commandType) { // TODO: what does singleton scope means when adding to collection? contributeCommands().addBinding().to(commandType).in(Singleton.class); return this; }
@Override public BQCoreModuleExtender initAllExtensions() { contributeConfigs(); contributeProperties(); contributeVariables(); contributeVariableDeclarations(); contributeLogLevels(); contributeOptions(); contributeCommands(); contributeCommandDecorators(); contributeOptionDecorators(); contributeValueObjectsDescriptors(); contributeOptionPathDecorators(); return this; }
public BQCoreModuleExtender addCommand(Command command) { contributeCommands().addBinding().toInstance(command); return this; }
public BQCoreModuleExtender addCommand(Class<? extends Command> commandType) { // TODO: what does singleton scope means when adding to collection? contributeCommands().addBinding().to(commandType).in(Singleton.class); return this; }
/** * @param binder DI binder passed to the Module that invokes this method. * @return {@link Multibinder} for Bootique commands. * @since 0.12 * @deprecated since 0.22 use {@link #extend(Binder)} to get an extender object, and * then call {@link BQCoreModuleExtender#addCommand(Class)}. */ @Deprecated public static Multibinder<Command> contributeCommands(Binder binder) { return extend(binder).contributeCommands(); }
@Override public BQCoreModuleExtender initAllExtensions() { contributeConfigs(); contributeProperties(); contributeVariables(); contributeVariableDeclarations(); contributeLogLevels(); contributeOptions(); contributeCommands(); contributeCommandDecorators(); contributeOptionDecorators(); return this; }