12637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin/* 22637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * Copyright (c) 2007 Mockito contributors 32637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * This program is made available under the terms of the MIT License. 42637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin */ 52637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinpackage org.mockito.plugins; 62637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin 72637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin/** 82637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * Configures test via annotations. 92637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * 102637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * <p>Mockito default engine handles the logic behind @Mock, @Captor, @Spy and @InjectMocks annotations. 112637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * 122637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * <p>This interface is an extension point that make possible to use a different annotation engine allowing to extend 132637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * or replace mockito default engine. 142637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * 152637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * <p> 162637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * If you are interested then see implementations or source code of {@link org.mockito.MockitoAnnotations#initMocks(Object)} 172637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * 182637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * <p>This plugin mechanism supersedes the {@link org.mockito.configuration.IMockitoConfiguration} 192637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * in regard of switching mockito components. 202637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin */ 212637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinpublic interface AnnotationEngine { 222637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin /** 232637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * Processes the test instance to configure annotated members. 242637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * 252637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * @param clazz Class where to extract field information, check implementation for details 262637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * @param testInstance Test instance 272637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin */ 282637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin void process(Class<?> clazz, Object testInstance); 292637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin} 30