Package io.cucumber.core.runtime
Class UuidGeneratorServiceLoader
java.lang.Object
io.cucumber.core.runtime.UuidGeneratorServiceLoader
Loads an instance of
UuidGenerator using the ServiceLoader
mechanism.
Will load an instance of the class provided by
Options.getUuidGeneratorClass(). If
Options.getUuidGeneratorClass() does not provide a class, if there is
exactly one UuidGenerator instance available that instance will be
used.
Otherwise RandomUuidGenerator with no dependency injection
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUuidGeneratorServiceLoader(Supplier<ClassLoader> classLoaderSupplier, Options options) -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringgetMultipleUuidGeneratorLogMessage(List<UuidGenerator> uuidGenerators) private static UuidGeneratorloadSelectedUuidGenerator(ServiceLoader<UuidGenerator> loader, Class<? extends UuidGenerator> uuidGeneratorClass) private static UuidGenerator
-
Field Details
-
classLoaderSupplier
-
options
-
-
Constructor Details
-
UuidGeneratorServiceLoader
-
-
Method Details
-
loadUuidGenerator
-
loadSingleUuidGeneratorOrDefault
-
loadSelectedUuidGenerator
private static UuidGenerator loadSelectedUuidGenerator(ServiceLoader<UuidGenerator> loader, Class<? extends UuidGenerator> uuidGeneratorClass) -
getMultipleUuidGeneratorLogMessage
-