net.jqwik.engine.execution.lifecycle.StoreRepository Maven / Gradle / Ivy
package net.jqwik.engine.execution.lifecycle;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import org.jspecify.annotations.*;
import org.junit.platform.engine.*;
import net.jqwik.api.*;
import net.jqwik.api.lifecycle.*;
/**
* StoreRepository and ScopedStore CANNOT handle concurrent execution of properties!
*/
public class StoreRepository {
private static StoreRepository current;
// I hate this singleton as much as any singleton.
// It seems to be necessary for the Store API though :-(
public synchronized static StoreRepository getCurrent() {
if (current == null) {
current = new StoreRepository();
}
return current;
}
private static class IdentifiedStores extends LinkedHashMap> {}
private final Map