ClassPathLoader
Date: 2015-09-18

org.mockito.internal.configuration

## Class ClassPathLoader

- java.lang.Object
- - org.mockito.internal.configuration.ClassPathLoader

-     public class ClassPathLoader
      extends java.lang.Object

  Loads configuration or extension points available in the classpath.

  - Can load the mockito configuration. The user who want to provide his own mockito configuration should write the class `org.mockito.configuration.MockitoConfiguration` that implements `IMockitoConfiguration`. For example :

         package org.mockito.configuration;

         //...

         public class MockitoConfiguration implements IMockitoConfiguration {
             boolean enableClassCache() { return false; }

             // ...
         }

  - Can load available mockito extensions. Currently Mockito only have one extension point the `MockMaker`. This extension point allows a user to provide his own bytecode engine to build mocks.
    Suppose you wrote an extension to create mocks with some Awesome library, in order to tell Mockito to use it you need to put in your classpath
    1. The implementation itself, for example `org.awesome.mockito.AwesomeMockMaker`.
    2. A file named `org.mockito.plugins.MockMaker` in a folder named `mockito-extensions`, the content of this file need to have one line with the qualified name `org.awesome.mockito.AwesomeMockMaker`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `MOCKITO_CONFIGURATION_CLASS_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassPathLoader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IMockitoConfiguration` | `loadConfiguration()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MOCKITO_CONFIGURATION_CLASS_NAME

          public static final java.lang.String MOCKITO_CONFIGURATION_CLASS_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ClassPathLoader

          public ClassPathLoader()

  - ### Method Detail

    - #### loadConfiguration

          public IMockitoConfiguration loadConfiguration()

      Returns:
        configuration loaded from classpath or null