public static <S> void loadComponentState(@NotNull PersistentStateComponent<S> configuration, @Nullable Element element) {
    if (element != null) {
      Class<S> stateClass = getStateClass(configuration.getClass());
      @SuppressWarnings("unchecked") S state = stateClass.equals(Element.class) ? (S)element : XmlSerializer.deserialize(element, stateClass);
      configuration.loadState(state);
    }
  }
public static <S> void loadComponentState(@NotNull PersistentStateComponent<S> configuration, @Nullable Element element)