code: public void clear() {
          synchronized (extensions) {    // we synchronize just to guard unnamedMerged
              transformerRegistry = TransformerRegistry.Factory.create();
              extensions.clear();
              reverseMap.clear();
              subsystemsInfo.clear();
          }
      }
docs: Clears the registry to prepare for re-registration (e.g. as part of a reload).