MockScanner
Date: 2015-09-18

org.mockito.internal.configuration.injection.scanner

## Class MockScanner

- java.lang.Object
- - org.mockito.internal.configuration.injection.scanner.MockScanner

-     public class MockScanner
      extends java.lang.Object

  Scan mocks, and prepare them if needed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockScanner(java.lang.Object instance, java.lang.Class<?> clazz)` Creates a MockScanner.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPreparedMocks(java.util.Set<java.lang.Object> mocks)` Add the scanned and prepared mock instance to the given collection.

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

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

- - ### Constructor Detail

    - #### MockScanner

          public MockScanner(java.lang.Object instance,
                     java.lang.Class<?> clazz)

      Creates a MockScanner.
      Parameters:
        `instance` - The test instance
        `clazz` - The class in the type hierarchy of this instance.

  - ### Method Detail

    - #### addPreparedMocks

          public void addPreparedMocks(java.util.Set<java.lang.Object> mocks)

      Add the scanned and prepared mock instance to the given collection.

      The preparation of mocks consists only in defining a MockName if not already set.

      Parameters:
        `mocks` - Set of mocks