Class GlobalConfiguration
- java.lang.Object
-
- org.mockito.internal.configuration.GlobalConfiguration
-
- All Implemented Interfaces:
java.io.Serializable,IMockitoConfiguration
public class GlobalConfiguration extends java.lang.Object implements IMockitoConfiguration, java.io.Serializable
Thread-safe wrapper on user-defined org.mockito.configuration.MockitoConfiguration implementation- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.ThreadLocal<IMockitoConfiguration>GLOBAL_CONFIGURATIONprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description GlobalConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancleansStackTrace()This should be turned on unless you're a Mockito developer and you wish to have verbose (read: messy) stack traces that only few understand (eg: Mockito developers)private IMockitoConfigurationcreateConfig()booleanenableClassCache()Allow objenesis to cache classes.Answer<java.lang.Object>getDefaultAnswer()Allows configuring the default answers of un-stubbed invocations(package private) IMockitoConfigurationgetIt()AnnotationEnginetryGetPluginAnnotationEngine()static voidvalidate()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
GLOBAL_CONFIGURATION
private static final java.lang.ThreadLocal<IMockitoConfiguration> GLOBAL_CONFIGURATION
-
-
Method Detail
-
getIt
IMockitoConfiguration getIt()
-
createConfig
private IMockitoConfiguration createConfig()
-
validate
public static void validate()
-
tryGetPluginAnnotationEngine
public AnnotationEngine tryGetPluginAnnotationEngine()
-
cleansStackTrace
public boolean cleansStackTrace()
Description copied from interface:IMockitoConfigurationThis should be turned on unless you're a Mockito developer and you wish to have verbose (read: messy) stack traces that only few understand (eg: Mockito developers)See javadoc for
IMockitoConfiguration- Specified by:
cleansStackTracein interfaceIMockitoConfiguration- Returns:
- if Mockito should clean stack traces
-
enableClassCache
public boolean enableClassCache()
Description copied from interface:IMockitoConfigurationAllow objenesis to cache classes. If you're in an environment where classes are dynamically reloaded, you can disable this to avoid classcast exceptions.- Specified by:
enableClassCachein interfaceIMockitoConfiguration
-
getDefaultAnswer
public Answer<java.lang.Object> getDefaultAnswer()
Description copied from interface:IMockitoConfigurationAllows configuring the default answers of un-stubbed invocationsSee javadoc for
IMockitoConfiguration- Specified by:
getDefaultAnswerin interfaceIMockitoConfiguration
-
-