Annotation Type ExcludeFromCodeCoverageGeneratedReport
@Retention(CLASS)
@Target({METHOD,TYPE,CONSTRUCTOR})
public @interface ExcludeFromCodeCoverageGeneratedReport
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
-
Optional Element Summary
Optional Elements
-
Element Details
-
reason
String reasonA human-readable explanation why it was excluded. As a convention use the following values for certain scenarios:unreachablefor 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 unreachablefor methods that catch an exception that is never thrown (e.g.,CloneNotSupportedException)jacoco bugfor scenarios where JaCoCo is clearly wrong
- Returns:
- The reason.
- Default:
""
-