Package org.junit.platform.launcher.core
Class LauncherConfigurationParameters
- java.lang.Object
-
- org.junit.platform.launcher.core.LauncherConfigurationParameters
-
- All Implemented Interfaces:
ConfigurationParameters
class LauncherConfigurationParameters extends java.lang.Object implements ConfigurationParameters
- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Properties
configParamsFromFile
private java.util.Map<java.lang.String,java.lang.String>
explicitConfigParams
private static Logger
logger
-
Fields inherited from interface org.junit.platform.engine.ConfigurationParameters
CONFIG_FILE_NAME
-
-
Constructor Summary
Constructors Constructor Description LauncherConfigurationParameters(java.util.Map<java.lang.String,java.lang.String> configParams)
LauncherConfigurationParameters(java.util.Map<java.lang.String,java.lang.String> configParams, java.lang.String configFileName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Properties
fromClasspathResource(java.lang.String configFileName)
java.util.Optional<java.lang.String>
get(java.lang.String key)
Get the configuration parameter stored under the specifiedkey
.java.util.Optional<java.lang.Boolean>
getBoolean(java.lang.String key)
Get the boolean configuration parameter stored under the specifiedkey
.private java.lang.String
getProperty(java.lang.String key)
int
size()
Get the number of configuration parameters stored directly in thisConfigurationParameters
.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.ConfigurationParameters
get
-
-
-
-
Field Detail
-
logger
private static final Logger logger
-
explicitConfigParams
private final java.util.Map<java.lang.String,java.lang.String> explicitConfigParams
-
configParamsFromFile
private final java.util.Properties configParamsFromFile
-
-
Constructor Detail
-
LauncherConfigurationParameters
LauncherConfigurationParameters(java.util.Map<java.lang.String,java.lang.String> configParams)
-
LauncherConfigurationParameters
LauncherConfigurationParameters(java.util.Map<java.lang.String,java.lang.String> configParams, java.lang.String configFileName)
-
-
Method Detail
-
fromClasspathResource
private static java.util.Properties fromClasspathResource(java.lang.String configFileName)
-
get
public java.util.Optional<java.lang.String> get(java.lang.String key)
Description copied from interface:ConfigurationParameters
Get the configuration parameter stored under the specifiedkey
.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.- Specified by:
get
in interfaceConfigurationParameters
- Parameters:
key
- the key to look up; nevernull
or blank- Returns:
- an
Optional
containing the value; nevernull
but potentially empty - See Also:
ConfigurationParameters.getBoolean(String)
,System.getProperty(String)
,ConfigurationParameters.CONFIG_FILE_NAME
-
getBoolean
public java.util.Optional<java.lang.Boolean> getBoolean(java.lang.String key)
Description copied from interface:ConfigurationParameters
Get the boolean configuration parameter stored under the specifiedkey
.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.- Specified by:
getBoolean
in interfaceConfigurationParameters
- Parameters:
key
- the key to look up; nevernull
or blank- Returns:
- an
Optional
containing the value; nevernull
but potentially empty - See Also:
ConfigurationParameters.get(String)
,Boolean.parseBoolean(String)
,System.getProperty(String)
,ConfigurationParameters.CONFIG_FILE_NAME
-
size
public int size()
Description copied from interface:ConfigurationParameters
Get the number of configuration parameters stored directly in thisConfigurationParameters
.- Specified by:
size
in interfaceConfigurationParameters
-
getProperty
private java.lang.String getProperty(java.lang.String key)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-