TestDataReader (int testClassId, int testMethodId) { return new TestDataReader() { private final String myTestClassName = myTestExecutionNameEnumerator.get(testClassId); private final String myTestMethodName = myTestExecutionNameEnumerator.get(testMethodId); private final MultiMap<String, String> myUsedMethods = new MultiMap<>(); private final List<String> myUsedFiles = new SmartList<>(); private int myCurrentClassId; @Override public void classProcessingStarted(int classId) { myCurrentClassId = classId; } @Override public void processUsedMethod(int methodId) { String className = myTestExecutionNameEnumerator.get(myCurrentClassId); String methodName = myTestExecutionNameEnumerator.get(methodId); if (className == null || methodName == null) { LOG.error("Inconsistent state"); return; } myUsedMethods.putValue(className, methodName); } @Override public void classProcessingFinished(int classId) { myCurrentClassId = -1; } @Override public void testDataProcessed() { myIndex.updateTestData(myTestClassName, myTestMethodName, myUsedMethods, myUsedFiles, myModuleName, myFrameworkId); } @Override public void processAffectedFile(int[] ints) { myUsedFiles.add(Arrays.stream(ints).mapToObj(id1 -> myTestExecutionNameEnumerator.get(id1)).collect(Collectors.joining(File.separator))); } }; }