Class DefaultAnnotationEngine
- java.lang.Object
-
- org.mockito.internal.configuration.DefaultAnnotationEngine
-
- All Implemented Interfaces:
AnnotationEngine
public class DefaultAnnotationEngine extends java.lang.Object implements AnnotationEngine
Initializes fields annotated with @Mock
or @Captor
.The
process(Class, Object)
method implementation does not process super classes!- See Also:
MockitoAnnotations
-
-
Constructor Summary
Constructors Constructor Description DefaultAnnotationEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
createMockFor(java.lang.annotation.Annotation annotation, java.lang.reflect.Field field)
void
process(java.lang.Class<?> clazz, java.lang.Object testInstance)
Allows extending the interface to perform action on specific fields on the test class.
-
-
-
Method Detail
-
createMockFor
public java.lang.Object createMockFor(java.lang.annotation.Annotation annotation, java.lang.reflect.Field field)
- Specified by:
createMockFor
in interfaceAnnotationEngine
- Parameters:
annotation
- Annotationfield
- Field details
-
process
public void process(java.lang.Class<?> clazz, java.lang.Object testInstance)
Description copied from interface:AnnotationEngine
Allows extending the interface to perform action on specific fields on the test class.See the implementation of this method to figure out what is it for.
- Specified by:
process
in interfaceAnnotationEngine
- Parameters:
clazz
- Class where to extract field information, check implementation for detailstestInstance
- Test instance
-
-