org.unitils.mock.annotation
Annotation Type AfterCreateMock


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface AfterCreateMock

Annotation for indicating that a method is to be called after a mock was created. This method can for example do some extra configuration or install the instance in a service locator.

The method should have following signature: void myMethod(Object mock, String name, Class type)

The passed object is the created mock. The name is the name of the mock, typically the name of the field. The type is the class type of the mocked instance.

Author:
Filip Neven, Tim Ducheyne, Kenny Claes



Copyright © 2011. All Rights Reserved.