Hi Qiao,

JaCoCo instruments every class files that has at least one method.

* Even a empty Java class will still get a default constructor.
* For enums the compiler generates several methods
* Only interfaces can result in class files without methods

I’m not sure what you mean by “coverage rate of this kind of class”. Some Infos:

 * The latest versions of JaCoCo filter out compiler generated code, so you 
will not see any coverage data e.g. for enums.
 * Access to public members (like constants or enum values) of such classes 
does not involve code execution and cannot be measured.

Regards,
-marc

> On 18. Sep 2018, at 05:03, wumangxing2...@gmail.com wrote:
> 
> Hi ,there
> 
>        when we write code,we may write some constant class or some 
> enumeration class,will jacoco add probes in this kind of class? Can jacoco 
> get coverage rate of this kind of class?
> 
> 
> Best regards 
> 
> Qiao
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jacoco+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/a5704f0d-2771-4fba-962f-d6497a7c52da%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/BCF396BD-E524-41D9-A37B-F0426B1E08DA%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to