code: public static Module newYarOSGiModule(final BundleContext bundleContext) {
          final BundleRegistry blockingSupplierRegistry = getBlockingSupplierRegistry(bundleContext);
          return new AbstractModule() {
              @Override
              protected void configure() {
                  Key<BundleRegistry> registryKey = Key.get(BundleRegistry.class);
                  bind(registryKey).toInstance(blockingSupplierRegistry);
                  bind(OSGiRegistry.class).to(registryKey);
                  bind(CLEANUP_BUNDLE_LISTENER).to(BundleStoppingListener.class);
                  install(newRegistryDeclarationModule(registryKey));
                  install(newOSGiModule(bundleContext));
              }
          };
      }
docs: Create a new module that bind the OSGi element: {@code Bundle} and {@code BundleContext}, and the bind the Yar's
  elements: {@code Registry} and {@code BlockingSupplierRegistry}.
  This module is required to make Yar works properly in the registry.
  This method return an instance of {@code AbstractModule} and not an instance of {@link org.javabits.yar.guice.RegistryModule}.
  
  @param bundleContext the bundle context associated to the injector.
  @return A module that binds all the {@code Registry} interfaces + the {@code Bundle} and the {@code BundleContext}