com.fitbur.mockito.internal.configuration.plugins.Plugins Maven / Gradle / Ivy
package com.fitbur.mockito.internal.configuration.plugins;
import com.fitbur.mockito.plugins.InstantiatorProvider;
import com.fitbur.mockito.plugins.MockMaker;
import com.fitbur.mockito.plugins.StackTraceCleanerProvider;
/**
* Access to Mockito behavior that can be reconfigured by plugins
*/
public class Plugins {
private static PluginRegistry registry = new PluginRegistry();
/**
* The implementation of the stack trace cleaner
*/
public static StackTraceCleanerProvider getStackTraceCleanerProvider() {
return registry.getStackTraceCleanerProvider();
}
/**
* Returns the implementation of the mock maker available for the current runtime.
*
* Returns default mock maker if no
* {@link com.fitbur.mockito.plugins.MockMaker} extension exists or is visible in the current classpath.
*/
public static MockMaker getMockMaker() {
return registry.getMockMaker();
}
/**
* Returns the instantiator provider available for the current runtime.
*
* Returns {@link com.fitbur.mockito.internal.creation.instance.DefaultInstantiatorProvider} if no
* {@link com.fitbur.mockito.plugins.InstantiatorProvider} extension exists or is visible in the current classpath.
*/
public static InstantiatorProvider getInstantiatorProvider() {
return registry.getInstantiatorProvider();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy