code: @SuppressWarnings("unchecked")
      protected <C> Constructor<C> retrieveCachedConstructor(Class<C> clazz) {
          return (Constructor<C>) constructorMemoization.computeIfAbsent(clazz, key -> {
              Constructor<C> constructor;
              try {
                  constructor = clazz.getDeclaredConstructor();
              } catch (ReflectiveOperationException e) {
                  throw new IllegalStateException("The class (" + clazz
                          + ") should have a no-arg constructor to create a planning clone.", e);
              }
              constructor.setAccessible(true);
              return constructor;
          });
      }
docs: This method is thread-safe.
  @param clazz never null
  @param <C> type
  @return never null