@Test public void syntheticMethodsShouldNotBeImplemented() { final Class clazz = SyntheticClass.Inner.class; CoverageClassVisitor visitor = new InstrumentationTemplate(clazz) { @Override protected void executeCode(ClassWriter cw, Class clazz) throws InvocationTargetException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException { } }.run(); assertFalse(visitor.getExistingLines().get(11)); }
public BitSet getExistingLines() { return existingLines; }
CoverageClassVisitor extends ClassVisitor implements Opcodes { public BitSet getExistingLines() { return existingLines; } }
CoverageClassVisitor extends ClassVisitor implements Opcodes { public BitSet getExistingLines() { return existingLines; } CoverageClassVisitor(ClassVisitor classVisitor, int classId); }
CoverageClassVisitor extends ClassVisitor implements Opcodes { public BitSet getExistingLines() { return existingLines; } CoverageClassVisitor(ClassVisitor classVisitor, int classId); @Override void visit(int version, int access, String name, String signature, String superName, String[] interfaces); @Override void visitInnerClass(String name, String outerName, String innerName, int access); @Override void visitSource(String source, String debug); @Override MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions); @Override void visitEnd(); int getClassId(); void setTrackTime(boolean trackTime); void setTrackBranches(boolean trackBranches); Map<Integer, List<Integer>> getMethodLineNumbers(); BitSet getExistingLines(); int[] getLineIndexes(); List<BranchPoint> getBranchPoints(); String getSource(); String getClassName(); boolean isInterface(); boolean isEnum(); List<String> getInnerClasses(); List<String> getMethodNames(); List<String> getMethodDescs(); }
CoverageClassVisitor extends ClassVisitor implements Opcodes { public BitSet getExistingLines() { return existingLines; } CoverageClassVisitor(ClassVisitor classVisitor, int classId); @Override void visit(int version, int access, String name, String signature, String superName, String[] interfaces); @Override void visitInnerClass(String name, String outerName, String innerName, int access); @Override void visitSource(String source, String debug); @Override MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions); @Override void visitEnd(); int getClassId(); void setTrackTime(boolean trackTime); void setTrackBranches(boolean trackBranches); Map<Integer, List<Integer>> getMethodLineNumbers(); BitSet getExistingLines(); int[] getLineIndexes(); List<BranchPoint> getBranchPoints(); String getSource(); String getClassName(); boolean isInterface(); boolean isEnum(); List<String> getInnerClasses(); List<String> getMethodNames(); List<String> getMethodDescs();  }