com.atlassian.clover.spi.lang
Enum LanguageConstruct.Builtin

java.lang.Object
  extended by java.lang.Enum<LanguageConstruct.Builtin>
      extended by com.atlassian.clover.spi.lang.LanguageConstruct.Builtin
All Implemented Interfaces:
LanguageConstruct, java.io.Serializable, java.lang.Comparable<LanguageConstruct.Builtin>
Enclosing interface:
LanguageConstruct

public static enum LanguageConstruct.Builtin
extends java.lang.Enum<LanguageConstruct.Builtin>
implements LanguageConstruct

Language constructs that Clover supports for the languages it supports out-of-the-box.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.clover.spi.lang.LanguageConstruct
LanguageConstruct.Builtin
 
Enum Constant Summary
BRANCH
           
GROOVY_ELVIS_OPERATOR
           
GROOVY_FIELD_EXPRESSION
           
GROOVY_SAFE_ATTRIBUTE
           
GROOVY_SAFE_METHOD
           
GROOVY_SAFE_PROPERTY
           
METHOD
           
STATEMENT
           
 
Method Summary
 java.lang.String calcCoverageMsg(SourceInfo sourceRegion, int trueBranchCount, int falseBranchCount, java.util.Locale locale)
          Calculates the message to be shown for the construct given its location in source, its coverage count and the current locale
 java.lang.String getId()
           
static LanguageConstruct.Builtin valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LanguageConstruct.Builtin[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

METHOD

public static final LanguageConstruct.Builtin METHOD

STATEMENT

public static final LanguageConstruct.Builtin STATEMENT

BRANCH

public static final LanguageConstruct.Builtin BRANCH

GROOVY_FIELD_EXPRESSION

public static final LanguageConstruct.Builtin GROOVY_FIELD_EXPRESSION

GROOVY_SAFE_METHOD

public static final LanguageConstruct.Builtin GROOVY_SAFE_METHOD

GROOVY_SAFE_PROPERTY

public static final LanguageConstruct.Builtin GROOVY_SAFE_PROPERTY

GROOVY_SAFE_ATTRIBUTE

public static final LanguageConstruct.Builtin GROOVY_SAFE_ATTRIBUTE

GROOVY_ELVIS_OPERATOR

public static final LanguageConstruct.Builtin GROOVY_ELVIS_OPERATOR
Method Detail

values

public static final LanguageConstruct.Builtin[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(LanguageConstruct.Builtin c : LanguageConstruct.Builtin.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static LanguageConstruct.Builtin valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getId

public java.lang.String getId()
Specified by:
getId in interface LanguageConstruct
Returns:
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.

calcCoverageMsg

public java.lang.String calcCoverageMsg(SourceInfo sourceRegion,
                                        int trueBranchCount,
                                        int falseBranchCount,
                                        java.util.Locale locale)
Description copied from interface: LanguageConstruct
Calculates the message to be shown for the construct given its location in source, its coverage count and the current locale

Specified by:
calcCoverageMsg in interface LanguageConstruct
Parameters:
sourceRegion - the region in source where the construct occurred
trueBranchCount - the coverage count for the true branch. If the construct is not a branch, the coverage is supplied here
falseBranchCount - the coverage count for the false branch or 0 if the construct doesn't support false branches
locale - the locale for the message
Returns: