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()
ExecutionContextgetClassLoader in interface ExecutionContextpublic BasicExecutionContext withClassLoader(ClassLoader newValue)
newValue - the new class loaderpublic Map<String,String> getConfigurations()
ExecutionContextgetConfigurations in interface ExecutionContextpublic BasicExecutionContext withConfigurations(Consumer<Map<String,String>> configurator)
configurator - the configuratorpublic Map<String,String> getEnvironmentVariables()
ExecutionContextgetEnvironmentVariables in interface ExecutionContextpublic BasicExecutionContext withEnvironmentVariables(Consumer<Map<String,String>> configurator)
configurator - the configuratorpublic <T> Optional<T> findResource(Class<T> type)
ExecutionContextfindResource in interface ExecutionContextT - 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–2018 Asakusa Framework Team. All rights reserved.