Example #1
0
  private void buildOpeningTagForFieldWrapper() {
    openingTag.setLength(0);
    openingTag.append("<span class='");

    StaticFieldData staticData = coverageInfo.getStaticFieldData(classAndFieldNames);
    boolean staticField = staticData != null;
    openingTag.append(staticField ? "static" : "instance");

    openingTag.append(coverageInfo.isCovered(classAndFieldNames) ? " covered" : " uncovered");

    InstanceFieldData instanceData = coverageInfo.getInstanceFieldData(classAndFieldNames);

    if (staticField || instanceData != null) {
      openingTag.append("' title='");
      appendAccessCounts(staticField ? staticData : instanceData);
    }

    openingTag.append("'>");
  }
Example #2
0
 private void appendAccessCounts(FieldData fieldData) {
   openingTag.append("Reads: ").append(fieldData.getReadCount());
   openingTag.append(" Writes: ").append(fieldData.getWriteCount());
 }