public static synchronized void applyTouchesOnProjectData( ProjectData projectData) { logger.debug("=================== START OF REPORT ======================== "); for (Class<?> c : registeredClasses.keySet()) { logger.debug("Report: " + c.getName()); ClassData cd = projectData.getOrCreateClassData(c.getName()); applyTouchesToSingleClassOnProjectData(cd, c); } logger.debug("=================== END OF REPORT ======================== "); }
public static synchronized void applyTouchesOnProjectData( ProjectData projectData) { logger .fine("=================== START OF REPORT ======================== "); for (Class<?> c : registeredClasses.keySet()) { logger.fine("Report: " + c.getName()); ClassData cd = projectData.getOrCreateClassData(c.getName()); applyTouchesToSingleClassOnProjectData(cd, c); } logger .fine("=================== END OF REPORT ======================== "); }
public void instrument( String file, int line ) { if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file); } else { ClassData classData = coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); classData.setSourceFileName( getSourceFilePath( file ) ); classData.addLine( line, null, null ); } } };
/** * @param name In the format * "net/sourceforge/cobertura/coverage/ClassInstrumenter" */ public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.myName = name.replace('/', '.'); this.classData = this.projectData.getOrCreateClassData(this.myName); this.classData.setContainsInstrumentationInfo(); // Do not attempt to instrument interfaces or classes that // have already been instrumented if (((access & Opcodes.ACC_INTERFACE) != 0) || arrayContains(interfaces, hasBeenInstrumented)) { super.visit(version, access, name, signature, superName, interfaces); } else { instrument = true; // Flag this class as having been instrumented String[] newInterfaces = new String[interfaces.length + 1]; System.arraycopy(interfaces, 0, newInterfaces, 0, interfaces.length); newInterfaces[newInterfaces.length - 1] = hasBeenInstrumented; super.visit(version, access, name, signature, superName, newInterfaces); } }
public void instrument( String file, int line ) { if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file); } else { ClassData classData = coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); classData.setSourceFileName( getSourceFilePath( file ) ); classData.addLine( line, null, null ); } } };
public void addResult( String file, Integer[] touchs ) { getLogger().debug("addresult " + file); if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file + " from touch"); } else { ClassData classData = this.coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); for ( Integer touch : touchs ) { classData.touch( touch, 1 ); } } }
public void addResult( String file, Integer[] touchs ) { getLogger().debug("addresult " + file); if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file + " from touch"); } else { ClassData classData = this.coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); for ( Integer touch : touchs ) { classData.touch( touch, 1 ); } } }
ClassData classData = projectData.getOrCreateClassData(className .replace('/', '.')); if (source != null) {
ClassData classData = projectData.getOrCreateClassData(className .replace('/', '.')); if (source != null) {