Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mockito.internal.configuration.injection
Class SpyOnInjectedFieldsHandler

    java.lang.Object
      org.mockito.internal.configuration.injection.MockInjectionStrategy
          org.mockito.internal.configuration.injection.SpyOnInjectedFieldsHandler

    public class SpyOnInjectedFieldsHandler

extends MockInjectionStrategy

Handler for field annotated with @InjectMocks and @Spy.

The handler assumes that field initialization AND injection already happened. So if the field is still null, then nothing will happen there.

Constructor Summary
`SpyOnInjectedFieldsHandler()`

Method Summary
`protected boolean` | `processInjection(java.lang.reflect.Field field, java.lang.Object fieldOwner, java.util.Set<java.lang.Object> mockCandidates)` Process actual injection.

Methods inherited from class org.mockito.internal.configuration.injection.MockInjectionStrategy
`nop, process, thenTry`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SpyOnInjectedFieldsHandler

    public SpyOnInjectedFieldsHandler()

Method Detail

### processInjection

    protected boolean processInjection(java.lang.reflect.Field field,
                                       java.lang.Object fieldOwner,
                                       java.util.Set<java.lang.Object> mockCandidates)

  Description copied from class: `MockInjectionStrategy`
  Process actual injection.

  Don't call this method directly, instead call `MockInjectionStrategy.process(Field, Object, Set)`

  Specified by:
    `processInjection` in class `MockInjectionStrategy`
  Parameters:
    `field` - Field needing injection
    `fieldOwner` - Field owner instance.
    `mockCandidates` - Pool of mocks to inject.
  Returns:
    `true` if injection occurred, `false` otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD