Jacoco是一个Java代码覆盖率统计工具,见:http://www.eclemma.org/jacoco/
JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team based on the lessons learned from using and integration existing libraries for many years.
note:
Jacoco weaves an additional field named $jacocoData into the inspected classes.
When invoking Class.getDeclaredField(), there will be an additional $jacocoData field.
Class cl=obj.getClass();
Field[] fields=cl.getDeclaredFields();