Top Description Fields Constructors Methods
org.junit.platform.engine.support.config

public Class PrefixedConfigurationParameters

extends Object
implements ConfigurationParameters
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.ConfigurationParameters
Annotations
@API
status:STABLE
since:1.10
Static Imports
org.apiguardian.api.API.Status.STABLE

View of ConfigurationParameters that applies a supplied prefix to all queries.
Since
1.3

Field Summary

Modifier and TypeField and Description
private final ConfigurationParameters
private final String

Constructor Summary

AccessConstructor and Description
public
PrefixedConfigurationParameters(ConfigurationParameters
the ConfigurationParameters to delegate to; never null
delegate
,
String
the prefix to apply to all queries; never null or blank
prefix
)

Create a new view of the supplied ConfigurationParameters that applies the supplied prefix to all queries.

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
get(String key)

Implements org.junit.platform.engine.ConfigurationParameters.get.

Get the configuration parameter stored under the specified key.

public <T> Optional<T>
get(String key, Function<? super String, ? extends @Nullable T> transformer)

Overrides default org.junit.platform.engine.ConfigurationParameters.get.

Get and transform the configuration parameter stored under the specified key using the specified transformer.

public Optional<Boolean>
getBoolean(String key)

Implements org.junit.platform.engine.ConfigurationParameters.getBoolean.

Get the boolean configuration parameter stored under the specified key.

public Set<String>
keySet()

Implements org.junit.platform.engine.ConfigurationParameters.keySet.

Get the keys of all configuration parameters stored in this ConfigurationParameters.

private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final ConfigurationParameters delegate
prefixback to summary
private final String prefix

Constructor Detail

PrefixedConfigurationParametersback to summary
public PrefixedConfigurationParameters(ConfigurationParameters delegate, String prefix)

Create a new view of the supplied ConfigurationParameters that applies the supplied prefix to all queries.

Parameters
delegate:ConfigurationParameters

the ConfigurationParameters to delegate to; never null

prefix:String

the prefix to apply to all queries; never null or blank

Method Detail

getback to summary
public Optional<String> get(String key)

Implements org.junit.platform.engine.ConfigurationParameters.get.

Doc from org.junit.platform.engine.ConfigurationParameters.get.

Get the configuration parameter stored under the specified key.

If no such key is present in this ConfigurationParameters, an attempt will be made to look up the value as a JVM system property. If no such system property exists, an attempt will be made to look up the value in the JUnit Platform properties file.

Annotations
@Override
getback to summary
public <T> Optional<T> get(String key, Function<? super String, ? extends @Nullable T> transformer)

Overrides default org.junit.platform.engine.ConfigurationParameters.get.

Doc from org.junit.platform.engine.ConfigurationParameters.get.

Get and transform the configuration parameter stored under the specified key using the specified transformer.

If no such key is present in this ConfigurationParameters, an attempt will be made to look up the value as a JVM system property. If no such system property exists, an attempt will be made to look up the value in the JUnit Platform properties file.

In case the transformer throws an exception, it will be wrapped in a JUnitException with a helpful message.

Annotations
@Override
getBooleanback to summary
public Optional<Boolean> getBoolean(String key)

Implements org.junit.platform.engine.ConfigurationParameters.getBoolean.

Doc from org.junit.platform.engine.ConfigurationParameters.getBoolean.

Get the boolean configuration parameter stored under the specified key.

If no such key is present in this ConfigurationParameters, an attempt will be made to look up the value as a JVM system property. If no such system property exists, an attempt will be made to look up the value in the JUnit Platform properties file.

Annotations
@Override
keySetback to summary
public Set<String> keySet()

Implements org.junit.platform.engine.ConfigurationParameters.keySet.

Doc from org.junit.platform.engine.ConfigurationParameters.keySet.

Get the keys of all configuration parameters stored in this ConfigurationParameters.

Annotations
@Override
prefixedback to summary
private String prefixed(String key)