net.jqwik.engine.execution.reporting.SampleReportingFormats Maven / Gradle / Ivy
The newest version!
package net.jqwik.engine.execution.reporting;
import java.util.*;
import net.jqwik.api.*;
import net.jqwik.engine.execution.lifecycle.*;
import net.jqwik.engine.support.*;
public class SampleReportingFormats {
private static final LazyServiceLoaderCache serviceCache = new LazyServiceLoaderCache<>(SampleReportingFormat.class);
public static Collection getReportingFormats() {
Set formats = new LinkedHashSet<>();
formats.addAll(getRegisteredReportingFormats());
formats.addAll(getReportingFormatsFromCurrentDomainContext());
return Collections.unmodifiableSet(formats);
}
private static Collection getReportingFormatsFromCurrentDomainContext() {
return CurrentDomainContext.get().getReportingFormats();
}
private static Collection getRegisteredReportingFormats() {
return serviceCache.getServices();
}
}