Top Description Fields Constructors Methods
org.junit.platform.launcher.core

pack-priv Class HierarchicalOutputDirectoryCreator

extends Object
implements OutputDirectoryCreator
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.OutputDirectoryCreator
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.List, java.util.function.Supplier, java.util.regex.Pattern, org.jspecify.annotations.Nullable, org.junit.platform.commons.util.Preconditions, org.junit.platform.engine.OutputDirectoryCreator, .TestDescriptor, .UniqueId.Segment

Hierarchical OutputDirectoryCreator that creates directories based on the unique ID segments of a TestDescriptor.
Since
1.12

Field Summary

Modifier and TypeField and Description
private static final Pattern
private static final String
private volatile @Nullable Path
private final Supplier<Path>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Path
createOutputDirectory(TestDescriptor testDescriptor)

Implements org.junit.platform.engine.OutputDirectoryCreator.createOutputDirectory.

Create an output directory for the supplied test descriptor.

public synchronized Path
getRootDirectory()

Implements org.junit.platform.engine.OutputDirectoryCreator.getRootDirectory.

Returns the root directory for all output files; never null.

private static String
private static Path
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FORBIDDEN_CHARSback to summary
private static final Pattern FORBIDDEN_CHARS
REPLACEMENTback to summary
private static final String REPLACEMENT
rootDirback to summary
private volatile @Nullable Path rootDir
rootDirSupplierback to summary
private final Supplier<Path> rootDirSupplier

Constructor Detail

HierarchicalOutputDirectoryCreatorback to summary
pack-priv HierarchicalOutputDirectoryCreator(Supplier<Path> rootDirSupplier)

Method Detail

createOutputDirectoryback to summary
public Path createOutputDirectory(TestDescriptor testDescriptor) throws IOException

Implements org.junit.platform.engine.OutputDirectoryCreator.createOutputDirectory.

Doc from org.junit.platform.engine.OutputDirectoryCreator.createOutputDirectory.

Create an output directory for the supplied test descriptor.

Annotations
@Override
Exceptions
IOException:
if the output directory could not be created
getRootDirectoryback to summary
public synchronized Path getRootDirectory()

Implements org.junit.platform.engine.OutputDirectoryCreator.getRootDirectory.

Doc from org.junit.platform.engine.OutputDirectoryCreator.getRootDirectory.

Returns the root directory for all output files; never null.

Annotations
@Override
sanitizeNameback to summary
private static String sanitizeName(String value)
toSanitizedPathback to summary
private static Path toSanitizedPath(UniqueId.Segment segment)