org.jacoco.core.internal.analysis
Class ClassAnalyzer

java.lang.Object
  extended by org.objectweb.asm.ClassVisitor
      extended by org.jacoco.core.internal.flow.ClassProbesVisitor
          extended by org.jacoco.core.internal.analysis.ClassAnalyzer

public class ClassAnalyzer
extends ClassProbesVisitor

Analyzes the structure of a class.


Field Summary
 
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv
 
Constructor Summary
ClassAnalyzer(long classid, boolean noMatch, boolean[] probes, StringPool stringPool)
          Creates a new analyzer that builds coverage data for a class.
 
Method Summary
 ClassCoverageImpl getCoverage()
          Returns the coverage data for this class after this visitor has been processed.
 void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
           
 org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
           
 MethodProbesVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
          When visiting a method we need a MethodProbesVisitor to handle the probes of that method.
 void visitSource(String source, String debug)
           
 void visitTotalProbeCount(int count)
          Reports the total number of encountered probes.
 
Methods inherited from class org.objectweb.asm.ClassVisitor
visitAnnotation, visitAttribute, visitEnd, visitInnerClass, visitOuterClass, visitTypeAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassAnalyzer

public ClassAnalyzer(long classid,
                     boolean noMatch,
                     boolean[] probes,
                     StringPool stringPool)
Creates a new analyzer that builds coverage data for a class.

Parameters:
classid - id of the class
noMatch - true if class id does not match with execution data
probes - execution data for this class or null
stringPool - shared pool to minimize the number of String instances
Method Detail

getCoverage

public ClassCoverageImpl getCoverage()
Returns the coverage data for this class after this visitor has been processed.

Returns:
coverage data for this class

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)
Overrides:
visit in class org.objectweb.asm.ClassVisitor

visitSource

public void visitSource(String source,
                        String debug)
Overrides:
visitSource in class org.objectweb.asm.ClassVisitor

visitMethod

public MethodProbesVisitor visitMethod(int access,
                                       String name,
                                       String desc,
                                       String signature,
                                       String[] exceptions)
Description copied from class: ClassProbesVisitor
When visiting a method we need a MethodProbesVisitor to handle the probes of that method.

Specified by:
visitMethod in class ClassProbesVisitor

visitField

public org.objectweb.asm.FieldVisitor visitField(int access,
                                                 String name,
                                                 String desc,
                                                 String signature,
                                                 Object value)
Overrides:
visitField in class org.objectweb.asm.ClassVisitor

visitTotalProbeCount

public void visitTotalProbeCount(int count)
Description copied from class: ClassProbesVisitor
Reports the total number of encountered probes. For classes this method is called just before ClassVisitor.visitEnd(). For interfaces this method is called before the first method (the static initializer) is emitted.

Specified by:
visitTotalProbeCount in class ClassProbesVisitor
Parameters:
count - total number of probes


Copyright © 2009-2015 Mountainminds GmbH & Co. KG. All Rights Reserved.