org.jacoco.core.internal.analysis
Class ClassAnalyzer

java.lang.Object
  extended by org.jacoco.core.internal.analysis.ClassAnalyzer
All Implemented Interfaces:
IClassProbesVisitor, org.objectweb.asm.ClassVisitor

public class ClassAnalyzer
extends Object
implements IClassProbesVisitor

Analyzes the structure of a class.


Constructor Summary
ClassAnalyzer(long classid, boolean[] executionData, 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.AnnotationVisitor visitAnnotation(String desc, boolean visible)
           
 void visitAttribute(org.objectweb.asm.Attribute attr)
           
 void visitEnd()
           
 org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
           
 void visitInnerClass(String name, String outerName, String innerName, int access)
           
 IMethodProbesVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
           
 void visitOuterClass(String owner, String name, String desc)
           
 void visitSource(String source, String debug)
           
 void visitTotalProbeCount(int count)
          Reports the total number of encountered probes.
 
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[] executionData,
                     StringPool stringPool)
Creates a new analyzer that builds coverage data for a class.

Parameters:
classid - id of the class
executionData - 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)
Specified by:
visit in interface org.objectweb.asm.ClassVisitor

visitSource

public void visitSource(String source,
                        String debug)
Specified by:
visitSource in interface org.objectweb.asm.ClassVisitor

visitMethod

public IMethodProbesVisitor visitMethod(int access,
                                        String name,
                                        String desc,
                                        String signature,
                                        String[] exceptions)
Specified by:
visitMethod in interface IClassProbesVisitor
Specified by:
visitMethod in interface org.objectweb.asm.ClassVisitor

visitTotalProbeCount

public void visitTotalProbeCount(int count)
Description copied from interface: IClassProbesVisitor
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 interface IClassProbesVisitor
Parameters:
count - total number of probes

visitAnnotation

public org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc,
                                                           boolean visible)
Specified by:
visitAnnotation in interface org.objectweb.asm.ClassVisitor

visitAttribute

public void visitAttribute(org.objectweb.asm.Attribute attr)
Specified by:
visitAttribute in interface org.objectweb.asm.ClassVisitor

visitField

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

visitInnerClass

public void visitInnerClass(String name,
                            String outerName,
                            String innerName,
                            int access)
Specified by:
visitInnerClass in interface org.objectweb.asm.ClassVisitor

visitOuterClass

public void visitOuterClass(String owner,
                            String name,
                            String desc)
Specified by:
visitOuterClass in interface org.objectweb.asm.ClassVisitor

visitEnd

public void visitEnd()
Specified by:
visitEnd in interface org.objectweb.asm.ClassVisitor


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