/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter * @param hits how many times the piece was called */ public void touchSwitch(int lineNumber, int switchNumber, int branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter * @param hits how many times the piece was called */ public void touchSwitch(int lineNumber, int switchNumber, int branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter */ public void touchSwitch(int lineNumber, int switchNumber, int branch) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch); } finally { lock.unlock(); } }
public void putSwitchTouchPoint(int classLine, int maxBranches, int... counterIds) { updateLine(classLine); LineData ld = getOrCreateLine(classLine); int switchId = switchesInLine++; classData.addLineSwitch(classLine, switchId, 0, counterIds.length - 2, maxBranches); for (int i = 0; i < counterIds.length; i++) { ld.touchSwitch(switchId, i - 1, res[counterIds[i]]); } }
public void putSwitchTouchPoint(int classLine, int maxBranches, int... counterIds) { updateLine(classLine); LineData ld = getOrCreateLine(classLine); int switchId = switchesInLine++; classData.addLineSwitch(classLine, switchId, 0, counterIds.length - 2, maxBranches); for (int i = 0; i < counterIds.length; i++) { ld.touchSwitch(switchId, i - 1, res[counterIds[i]]); } }