You have to take two steps:
1) Define method contexts in the <clover-setup> task containing regular expressions for the methods you want to map, for example:
<clover-setup ...>
<methodContext name="equals" regexp="public boolean equals\(.*\)"/>
<methodContext name="hashCode" regexp="public int hashCode\(\)"/>
</clover-setup>
2) Determine which method contexts should be excluded from the report in <clover-report> Task
<clover-report>
<current outfile="clover_html" title="My Coverage">
<format type="html" filter="equals,hashCode"/>
</current>
Additional Information:
Marek source
share