org.mockito.internal.configuration.plugins.Plugins Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of securemock Show documentation
Show all versions of securemock Show documentation
Libraries for Elasticsearch
The newest version!
/*
* Copyright (c) 2016 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.configuration.plugins;
import org.mockito.plugins.AnnotationEngine;
import org.mockito.plugins.InstantiatorProvider;
import org.mockito.plugins.MockMaker;
import org.mockito.plugins.MockitoPlugins;
import org.mockito.plugins.StackTraceCleanerProvider;
/**
* Access to Mockito behavior that can be reconfigured by plugins
*/
public class Plugins {
/**
* The implementation of the stack trace cleaner
*/
public static StackTraceCleanerProvider getStackTraceCleanerProvider() {
return PluginRegistry.getStackTraceCleanerProvider();
}
/**
* Returns the implementation of the mock maker available for the current runtime.
*
* Returns default mock maker if no
* {@link MockMaker} extension exists or is visible in the current classpath.
*/
public static MockMaker getMockMaker() {
return PluginRegistry.getMockMaker();
}
/**
* Returns the instantiator provider available for the current runtime.
*
* Returns {@link org.mockito.internal.creation.instance.DefaultInstantiatorProvider} if no
* {@link InstantiatorProvider} extension exists or is visible in the current classpath.
*/
public static InstantiatorProvider getInstantiatorProvider() {
return PluginRegistry.getInstantiatorProvider();
}
/**
* Returns the annotation engine available for the current runtime.
*
* Returns {@link org.mockito.internal.configuration.InjectingAnnotationEngine} if no
* {@link AnnotationEngine} extension exists or is visible in the current classpath.
*/
public static AnnotationEngine getAnnotationEngine() {
return PluginRegistry.getAnnotationEngine();
}
/**
* @return instance of mockito plugins type
*/
public static MockitoPlugins getPlugins() {
return new DefaultMockitoPlugins();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy