Top Description Methods
com.kohlschutter.annotations.compiletime

public @Interface ExcludeFromCodeCoverageGeneratedReport

extends Annotation
Annotations
@Retention:CLASS
@Target:METHOD, TYPE, CONSTRUCTOR
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Marks a type or method that should be excluded from code-coverage calculations.

Implementation Note

Jacoco recognizes all annotations that contain the string "Generated", therefore this class should not be renamed.

Author
Christian Kohlschütter

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The reason.
reason
()

A human-readable explanation why it was excluded.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

reasonback to summary
public String reason()

A human-readable explanation why it was excluded. As a convention use the following values for certain scenarios:

  • unreachable for clearly unreachable code (e.g., a private constructor in a static helper class) and methods that are assumed but not guaranteed to never be called (e.g., implementations of an abstract/interface method that are expected to never be called due to implementation specifics)
  • exception unreachable for methods that catch an exception that is never thrown (e.g., CloneNotSupportedException)
  • jacoco bug for scenarios where JaCoCo is clearly wrong
Returns:String

The reason.