.invoke(null, new Object[]{}); LightClassmapListener lightClassmap = new ApplyToClassDataLightClassmapListener( classData, res); Method m = c.getDeclaredMethod( final int[] res = (int[]) m0.invoke(null, new Object[]{}); LightClassmapListener lightClassmap = new ApplyToClassDataLightClassmapListener( classData, res); Method m = c.getDeclaredMethod(
private static void applyTouchesToSingleClassOnProjectData( final ClassData classData, final Class<?> c) { logger.trace("----------- " + maybeCanonicalName(c) + " ---------------- "); try { Method m0 = c .getDeclaredMethod(AbstractCodeProvider.COBERTURA_GET_AND_RESET_COUNTERS_METHOD_NAME); m0.setAccessible(true); final int[] res = (int[]) m0.invoke(null, new Object[]{}); LightClassmapListener lightClassmap = new ApplyToClassDataLightClassmapListener( classData, res); Method m = c.getDeclaredMethod( AbstractCodeProvider.COBERTURA_CLASSMAP_METHOD_NAME, LightClassmapListener.class); m.setAccessible(true); m.invoke(null, lightClassmap); } catch (Exception e) { logger.error("Cannot apply touches", e); } }
public void putJumpTouchPoint(int classLine, int trueCounterId, int falseCounterId) { updateLine(classLine); LineData ld = getOrCreateLine(classLine); int branchId = jumpsInLine++; classData.addLineJump(classLine, branchId); ld.touchJump(branchId, true, res[trueCounterId]); ld.touchJump(branchId, false, res[falseCounterId]); }
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]]); } }
public void putLineTouchPoint(int classLine, int counterId, String methodName, String methodDescription) { updateLine(classLine); LineData ld = classData.addLine(classLine, methodName, methodDescription); ld.touch(res[counterId]); }
public void putLineTouchPoint(int classLine, int counterId, String methodName, String methodDescription) { updateLine(classLine); LineData ld = classData.addLine(classLine, methodName, methodDescription); ld.touch(res[counterId]); }
public void putJumpTouchPoint(int classLine, int trueCounterId, int falseCounterId) { updateLine(classLine); LineData ld = getOrCreateLine(classLine); int branchId = jumpsInLine++; classData.addLineJump(classLine, branchId); ld.touchJump(branchId, true, res[trueCounterId]); ld.touchJump(branchId, false, res[falseCounterId]); }