class InitializeReceiverGenerator implements IPlugin {

    @Override
    public void load() throws PluginException {
        try {
            IBootstrapItem<String> item = new BootstrapItem("InitializeReceiverGenerator");
            item
                    .after("IOC")
                    .process(
                            () -> {
                                try {
                                    IReceiverGenerator rg = new ReceiverGenerator(this.getClass().getClassLoader());
                                    IOC.register(
                                            Keys.getOrAdd(IReceiverGenerator.class.getCanonicalName()),
                                            new SingletonStrategy(rg)
                                    );
                                } catch (ResolutionException e) {
                                    throw new ActionExecuteException("InitializeReceiverGenerator plugin can't load: can't get InitializeReceiverGenerator key", e);
                                } catch (InvalidArgumentException e) {
                                    throw new ActionExecuteException("InitializeReceiverGenerator plugin can't load: can't create strategy", e);
                                } catch (RegistrationException e) {
                                    throw new ActionExecuteException("InitializeReceiverGenerator plugin can't load: can't register new strategy", e);
                                }
                            }
                        );
            this.bootstrap.add(item);
        } catch (Throwable e) {
            throw new PluginException("Could not load 'ReceiverGenerator plugin'", e);
        }
    }

    public  InitializeReceiverGenerator(final IBootstrap<IBootstrapItem<String>> bootstrap);

}