This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

Skip to end of metadata
Go to start of metadata

Clover supports a number of inline source directives that you can use in your source to control instrumentation. Directives can be on a line by themselves or part of any valid single or multi-line Java comment.

Clover source directives currently do not support Groovy.

Switching Clover on and off


This directive will switch Clover instrumentation on/off. This might be useful if you don't want Clover to instrument a section of code for some reason. Note that the scope of this directive is the current file only.

Force Clover to flush


Clover will insert code to flush coverage data to disk. The flush code will be inserted as soon as possible after the directive. See Using a Flush Policy.

Change instrumentation strategy


This source directive has been deprecated and has no effect in Clover 1.3 and above.


Clover will use a static holder class rather than a static member variable to support instrumentation for the current file. The directive must occur before the first top level class declaration in the file. This directive is useful when you don't want Clover to change the public interface of your class (e.g. in EJB compilation).