Class Plugins
- java.lang.Object
-
- org.mockito.internal.configuration.plugins.Plugins
-
public final class Plugins extends java.lang.Object
Access to Mockito behavior that can be reconfigured by plugins
-
-
Field Summary
Fields Modifier and Type Field Description private static PluginRegistry
registry
-
Constructor Summary
Constructors Modifier Constructor Description private
Plugins()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AnnotationEngine
getAnnotationEngine()
Returns the annotation engine available for the current runtime.static InstantiatorProvider2
getInstantiatorProvider()
Returns the instantiator provider available for the current runtime.static MemberAccessor
getMemberAccessor()
Returns the implementation of the member accessor available for the current runtime.static MockitoLogger
getMockitoLogger()
Returns the logger available for the current runtime.static MockMaker
getMockMaker()
Returns the implementation of the mock maker available for the current runtime.static java.util.List<MockResolver>
getMockResolvers()
Returns a list of available mock resolvers if any.static MockitoPlugins
getPlugins()
static StackTraceCleanerProvider
getStackTraceCleanerProvider()
The implementation of the stack trace cleaner
-
-
-
Field Detail
-
registry
private static final PluginRegistry registry
-
-
Method Detail
-
getStackTraceCleanerProvider
public static StackTraceCleanerProvider getStackTraceCleanerProvider()
The implementation of the stack trace cleaner
-
getMockMaker
public static MockMaker getMockMaker()
Returns the implementation of the mock maker available for the current runtime.Returns default mock maker if no
MockMaker
extension exists or is visible in the current classpath.
-
getMemberAccessor
public static MemberAccessor getMemberAccessor()
Returns the implementation of the member accessor available for the current runtime.Returns default member accessor if no
MemberAccessor
extension exists or is visible in the current classpath.
-
getInstantiatorProvider
public static InstantiatorProvider2 getInstantiatorProvider()
Returns the instantiator provider available for the current runtime.Returns
DefaultInstantiatorProvider
if noInstantiatorProvider2
extension exists or is visible in the current classpath.
-
getAnnotationEngine
public static AnnotationEngine getAnnotationEngine()
Returns the annotation engine available for the current runtime.Returns
InjectingAnnotationEngine
if noAnnotationEngine
extension exists or is visible in the current classpath.
-
getMockitoLogger
public static MockitoLogger getMockitoLogger()
Returns the logger available for the current runtime.Returns
ConsoleMockitoLogger
if noMockitoLogger
extension exists or is visible in the current classpath.
-
getMockResolvers
public static java.util.List<MockResolver> getMockResolvers()
Returns a list of available mock resolvers if any.- Returns:
- A list of available mock resolvers or an empty list if none are registered.
-
getPlugins
public static MockitoPlugins getPlugins()
- Returns:
- instance of mockito plugins type
-
-