Class DefaultAnnotationEngine
java.lang.Object
org.mockito.internal.configuration.DefaultAnnotationEngine
- All Implemented Interfaces:
AnnotationEngine
Initializes fields annotated with @
Mock
or @Captor
.
The process(Class, Object)
method implementation does not process super classes!
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMockFor
(Annotation annotation, Field field) void
Allows extending the interface to perform action on specific fields on the test class.
-
Constructor Details
-
DefaultAnnotationEngine
public DefaultAnnotationEngine()
-
-
Method Details
-
createMockFor
- Specified by:
createMockFor
in interfaceAnnotationEngine
- Parameters:
annotation
- Annotationfield
- Field details
-
process
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
-