• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2007 Mockito contributors
3  * This program is made available under the terms of the MIT License.
4  */
5 package org.mockito.internal.configuration.injection.filter;
6 
7 /**
8  * Allow the ongoing injection of a mock candidate.
9  */
10 public interface OngoingInjector {
11 
12     /**
13      * Inject the mock.
14      *
15      * <p>
16      * Please check the actual implementation.
17      * </p>
18      *
19      * @return the mock that was injected, <code>null</code> otherwise.
20      */
thenInject()21     Object thenInject();
22 
23     /**
24      * Injector that will do nothing, and will return <code>null</code> as no mocks will be injected
25      */
26     OngoingInjector nop = new OngoingInjector() {
27         public Object thenInject() {
28             return null;
29         }
30     };
31 }
32