public class BasicExecutionContext extends Object implements ExecutionContext
ExecutionContext
.Constructor and Description |
---|
BasicExecutionContext() |
Modifier and Type | Method and Description |
---|---|
<T> Optional<T> |
findResource(Class<T> type)
Returns a resource for the type.
|
ClassLoader |
getClassLoader()
Returns the class loader to load testing peripherals.
|
Map<String,String> |
getConfigurations()
Returns the platform configurations.
|
Map<String,String> |
getEnvironmentVariables()
Returns the environment variables.
|
BasicExecutionContext |
withClassLoader(ClassLoader newValue)
Configures the class loader.
|
BasicExecutionContext |
withConfigurations(Consumer<Map<String,String>> configurator)
Configure configurations.
|
BasicExecutionContext |
withEnvironmentVariables(Consumer<Map<String,String>> configurator)
Configures environment variables.
|
<T> BasicExecutionContext |
withResource(Class<T> type,
T value)
Configures resources.
|
public ClassLoader getClassLoader()
ExecutionContext
getClassLoader
in interface ExecutionContext
public BasicExecutionContext withClassLoader(ClassLoader newValue)
newValue
- the new class loaderpublic Map<String,String> getConfigurations()
ExecutionContext
getConfigurations
in interface ExecutionContext
public BasicExecutionContext withConfigurations(Consumer<Map<String,String>> configurator)
configurator
- the configuratorpublic Map<String,String> getEnvironmentVariables()
ExecutionContext
getEnvironmentVariables
in interface ExecutionContext
public BasicExecutionContext withEnvironmentVariables(Consumer<Map<String,String>> configurator)
configurator
- the configuratorpublic <T> Optional<T> findResource(Class<T> type)
ExecutionContext
findResource
in interface ExecutionContext
T
- the provider typetype
- the provider typeempty
if it is not definedpublic <T> BasicExecutionContext withResource(Class<T> type, T value)
T
- the resource typetype
- the resource typevalue
- the resource valueCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.