code: public synchronized void register(OsgiModelSource<?> modelSource) {
          if (modelSource == null) {
              throw new IllegalArgumentException("method parameter modelSource must not be null");
          }
  
          Class<?> modelType = modelSource.getModelType();
          ResourceModelMetaData modelMetaData = new ResourceModelMetaData(modelType);
          ResourceModelMetadataHolder holder = new ResourceModelMetadataHolder(modelSource, modelMetaData);
  
          Map<Class<?>, ResourceModelMetadataHolder> newCache = copyCache();
          newCache.put(getUserClass(modelType), holder);
  
          this.cache = newCache;
      }
docs: Creates a new {@link ResourceModelMetaData} for the model represented
  by the provided model source.
  
  @param modelSource must not be <code>null</code>.