docs: @SuppressWarnings("unchecked")
      public void addExtensionFactory(ExtensionFactory factory) {
          synchronized (lock) {
              if (initialized) {
                  if (null == extensionFactories) {
                      extensionFactories = new ArrayList();
                  }
                  if(!extensionFactories.contains(factory)){
                  extensionFactories.add(factory);
                  }
                  initializeExtensionProcessors(extensionFactories);
              } else {
                  if(!extensionFactories.contains(factory)){
                  extensionFactories.add(factory);
              }
          }
      }
      }