
com.atlassian.clover.spi.lang.LanguageConstruct Maven / Gradle / Ivy
package com.atlassian.clover.spi.lang;
import com.atlassian.clover.api.registry.SourceInfo;
import com.cenqua.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 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