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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
LauncherConfigurationParameters.Builder
private static interface
LauncherConfigurationParameters.ParameterProvider
-
Field Summary
Fields Modifier and Type Field Description private static Logger
logger
private java.util.List<LauncherConfigurationParameters.ParameterProvider>
providers
-
Fields inherited from interface org.junit.platform.engine.ConfigurationParameters
CONFIG_FILE_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description private
LauncherConfigurationParameters(java.util.List<LauncherConfigurationParameters.ParameterProvider> providers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static LauncherConfigurationParameters.Builder
builder()
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)
private static java.util.Properties
loadClasspathResource(java.lang.String configFileName)
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
-
providers
private final java.util.List<LauncherConfigurationParameters.ParameterProvider> providers
-
-
Constructor Detail
-
LauncherConfigurationParameters
private LauncherConfigurationParameters(java.util.List<LauncherConfigurationParameters.ParameterProvider> providers)
-
-
Method Detail
-
builder
static LauncherConfigurationParameters.Builder builder()
-
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
-
loadClasspathResource
private static java.util.Properties loadClasspathResource(java.lang.String configFileName)
-
-