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.PropertiesconfigParamsFromFileprivate java.util.Map<java.lang.String,java.lang.String>explicitConfigParamsprivate static Loggerlogger-
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.PropertiesfromClasspathResource(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.StringgetProperty(java.lang.String key)intsize()Get the number of configuration parameters stored directly in thisConfigurationParameters.java.lang.StringtoString()-
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:ConfigurationParametersGet 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:
getin interfaceConfigurationParameters- Parameters:
key- the key to look up; nevernullor blank- Returns:
- an
Optionalcontaining the value; nevernullbut 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:ConfigurationParametersGet 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:
getBooleanin interfaceConfigurationParameters- Parameters:
key- the key to look up; nevernullor blank- Returns:
- an
Optionalcontaining the value; nevernullbut 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:ConfigurationParametersGet the number of configuration parameters stored directly in thisConfigurationParameters.- Specified by:
sizein interfaceConfigurationParameters
-
getProperty
private java.lang.String getProperty(java.lang.String key)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-