Class DefaultBootstrapContext
- java.lang.Object
- org.springframework.test.context.support.DefaultBootstrapContext
- All Implemented Interfaces:
BootstrapContext
public class DefaultBootstrapContext extends Object implements BootstrapContext
Default implementation of theBootstrapContext
interface.- Since:
- 4.1
- Author:
- Sam Brannen
Constructor Summary
Constructors Constructor Description DefaultBootstrapContext(Class<?> testClass, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate)
Construct a newDefaultBootstrapContext
from the supplied arguments.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheAwareContextLoaderDelegate
getCacheAwareContextLoaderDelegate()
Get theCacheAwareContextLoaderDelegate
to use for transparent interaction with theContextCache
.Class<?>
getTestClass()
Get the test class for this bootstrap context.String
toString()
Provide a String representation of this bootstrap context's state.
Constructor Detail
DefaultBootstrapContext
public DefaultBootstrapContext(Class<?> testClass, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate)
Construct a newDefaultBootstrapContext
from the supplied arguments.- Parameters:
testClass
- the test class for this bootstrap context; nevernull
cacheAwareContextLoaderDelegate
- the context loader delegate to use for transparent interaction with theContextCache
; nevernull
Method Detail
getTestClass
public Class<?> getTestClass()
Get the test class for this bootstrap context.- Specified by:
getTestClass
in interfaceBootstrapContext
- Returns:
- the test class (never
null
)
getCacheAwareContextLoaderDelegate
public CacheAwareContextLoaderDelegate getCacheAwareContextLoaderDelegate()
Get theCacheAwareContextLoaderDelegate
to use for transparent interaction with theContextCache
.- Specified by:
getCacheAwareContextLoaderDelegate
in interfaceBootstrapContext
- Returns:
- the context loader delegate (never
null
)