com.atlassian.clover.spi.lang.LanguageConstruct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clover Show documentation
Show all versions of clover Show documentation
Clover is an award winning code coverage and testing tool for Java and Groovy.
It integrates easily with Maven, Ant, Grails, Eclipse and IntelliJ IDEA
as well as with continuous integration servers such as Bamboo, Jenkins or Hudson.
Note: before Clover 4.0 this artifact was named com.cenqua.clover:clover.
package com.atlassian.clover.spi.lang;
import com.atlassian.clover.api.registry.SourceInfo;
import com.atlassian.clover.reporters.html.source.SourceRenderHelper;
import java.text.MessageFormat;
import java.util.Locale;
public interface LanguageConstruct {
/**
* @return a unique, unchanging ID for the language construct. It should be as short as possible as it is stored in the clover database for each occurance of the construct.
*/
String getId();
/**
* Calculates the message to be shown for the construct given its location in source, its coverage count and the current locale
* @param sourceRegion the region in source where the construct occurred
* @param trueBranchCount the coverage count for the true branch. If the construct is not a branch, the coverage is supplied here
* @param falseBranchCount the coverage count for the false branch or 0 if the construct doesn't support false branches
* @param locale the locale for the message
* @return String message
*/
String calcCoverageMsg(SourceInfo sourceRegion, int trueBranchCount, int falseBranchCount, Locale locale);
/**
* Language constructs that Clover supports for the languages it supports out-of-the-box.
*/
public enum Builtin implements LanguageConstruct {
METHOD("()", "method {2,choice,0#not entered|1#entered {2,number,integer} time|1
© 2015 - 2025 Weber Informatics LLC | Privacy Policy