java.lang.Object
org.mockito.internal.configuration.plugins.Plugins

public final class Plugins extends Object
Access to Mockito behavior that can be reconfigured by plugins
  • Field Details

  • Constructor Details

    • Plugins

      private Plugins()
  • Method Details

    • 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 no InstantiatorProvider2 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 no AnnotationEngine 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 no MockitoLogger extension exists or is visible in the current classpath.

    • getMockResolvers

      public static 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