code: public final void register() {
          synchronized (lock) {
              if (serviceRegistration == null) {
                  BundleClassResolver resolver = new BundleClassResolver();
                  serviceRegistration = bundleContext.registerService(SERVICE_NAMES, resolver, serviceProperties);
              }
          }
      }
docs: Register class resolver.