org.pf.tools.cda.core.dependency.analyzer
Class ClassFileAnalyzer

java.lang.Object
  extended by org.apache.bcel.classfile.EmptyVisitor
      extended by org.pf.tools.cda.core.dependency.analyzer.ClassFileAnalyzer
All Implemented Interfaces:
org.apache.bcel.classfile.Visitor

public class ClassFileAnalyzer
extends org.apache.bcel.classfile.EmptyVisitor

Extracts all dependency details from a single class file into the underlying model (i.e. ClassInformation).

Version:
1.4
Author:
Manfred Duchrow

Constructor Summary
ClassFileAnalyzer(IClassSpace aClassSpace)
          Initialize the new instance with default values.
 
Method Summary
 void analyze(ClassInformation classInfo)
          Analyze the given class in the context of the analyzer's current workset.
 void visitAnnotation(org.apache.bcel.classfile.Annotation annotation)
           
 void visitAnnotationElementAnnotationValue(org.apache.bcel.classfile.AnnotationElementAnnotationValue elementAnnotationValue)
           
 void visitAnnotationElementClassValue(org.apache.bcel.classfile.AnnotationElementClassValue elementClassValue)
           
 void visitAnnotationElementConstantValue(org.apache.bcel.classfile.AnnotationElementConstantValue elementConstantValue)
           
 void visitAnnotationElementEnumValue(org.apache.bcel.classfile.AnnotationElementEnumConstantValue elementEnumValue)
           
 void visitConstantClass(org.apache.bcel.classfile.ConstantClass classRef)
           
 void visitConstantNameAndType(org.apache.bcel.classfile.ConstantNameAndType nameAndType)
           
 void visitField(org.apache.bcel.classfile.Field field)
           
 void visitJavaClass(org.apache.bcel.classfile.JavaClass javaClass)
           
 void visitLocalVariable(org.apache.bcel.classfile.LocalVariable localVar)
           
 void visitLocalVariableTable(org.apache.bcel.classfile.LocalVariableTable localVarsTable)
           
 void visitMethod(org.apache.bcel.classfile.Method method)
           
 
Methods inherited from class org.apache.bcel.classfile.EmptyVisitor
visitAnnotationElementArrayValue, visitAnnotationElementValuePair, visitCode, visitCodeException, visitConstantDouble, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantInvokeDynamic, visitConstantLong, visitConstantMethodHandle, visitConstantMethodref, visitConstantMethodType, visitConstantPool, visitConstantString, visitConstantUtf8, visitConstantValue, visitDeprecated, visitExceptionTable, visitInnerClass, visitInnerClasses, visitLineNumber, visitLineNumberTable, visitParameterAnnotations, visitRuntimeInvisibleAnnotations, visitRuntimeParameterAnnotationsAttribute, visitRuntimeVisibleAnnotations, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitSynthetic, visitUnknown
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileAnalyzer

public ClassFileAnalyzer(IClassSpace aClassSpace)
Initialize the new instance with default values.

Method Detail

analyze

public void analyze(ClassInformation classInfo)
Analyze the given class in the context of the analyzer's current workset. As a result the classInfo object contains all directly referred classes.


visitJavaClass

public void visitJavaClass(org.apache.bcel.classfile.JavaClass javaClass)
Specified by:
visitJavaClass in interface org.apache.bcel.classfile.Visitor
Overrides:
visitJavaClass in class org.apache.bcel.classfile.EmptyVisitor

visitConstantClass

public void visitConstantClass(org.apache.bcel.classfile.ConstantClass classRef)
Specified by:
visitConstantClass in interface org.apache.bcel.classfile.Visitor
Overrides:
visitConstantClass in class org.apache.bcel.classfile.EmptyVisitor

visitField

public void visitField(org.apache.bcel.classfile.Field field)
Specified by:
visitField in interface org.apache.bcel.classfile.Visitor
Overrides:
visitField in class org.apache.bcel.classfile.EmptyVisitor

visitConstantNameAndType

public void visitConstantNameAndType(org.apache.bcel.classfile.ConstantNameAndType nameAndType)
Specified by:
visitConstantNameAndType in interface org.apache.bcel.classfile.Visitor
Overrides:
visitConstantNameAndType in class org.apache.bcel.classfile.EmptyVisitor

visitLocalVariable

public void visitLocalVariable(org.apache.bcel.classfile.LocalVariable localVar)
Specified by:
visitLocalVariable in interface org.apache.bcel.classfile.Visitor
Overrides:
visitLocalVariable in class org.apache.bcel.classfile.EmptyVisitor

visitAnnotation

public void visitAnnotation(org.apache.bcel.classfile.Annotation annotation)
Specified by:
visitAnnotation in interface org.apache.bcel.classfile.Visitor
Overrides:
visitAnnotation in class org.apache.bcel.classfile.EmptyVisitor

visitAnnotationElementEnumValue

public void visitAnnotationElementEnumValue(org.apache.bcel.classfile.AnnotationElementEnumConstantValue elementEnumValue)
Specified by:
visitAnnotationElementEnumValue in interface org.apache.bcel.classfile.Visitor
Overrides:
visitAnnotationElementEnumValue in class org.apache.bcel.classfile.EmptyVisitor

visitAnnotationElementAnnotationValue

public void visitAnnotationElementAnnotationValue(org.apache.bcel.classfile.AnnotationElementAnnotationValue elementAnnotationValue)
Specified by:
visitAnnotationElementAnnotationValue in interface org.apache.bcel.classfile.Visitor
Overrides:
visitAnnotationElementAnnotationValue in class org.apache.bcel.classfile.EmptyVisitor

visitAnnotationElementConstantValue

public void visitAnnotationElementConstantValue(org.apache.bcel.classfile.AnnotationElementConstantValue elementConstantValue)
Specified by:
visitAnnotationElementConstantValue in interface org.apache.bcel.classfile.Visitor
Overrides:
visitAnnotationElementConstantValue in class org.apache.bcel.classfile.EmptyVisitor

visitAnnotationElementClassValue

public void visitAnnotationElementClassValue(org.apache.bcel.classfile.AnnotationElementClassValue elementClassValue)
Specified by:
visitAnnotationElementClassValue in interface org.apache.bcel.classfile.Visitor
Overrides:
visitAnnotationElementClassValue in class org.apache.bcel.classfile.EmptyVisitor

visitLocalVariableTable

public void visitLocalVariableTable(org.apache.bcel.classfile.LocalVariableTable localVarsTable)
Specified by:
visitLocalVariableTable in interface org.apache.bcel.classfile.Visitor
Overrides:
visitLocalVariableTable in class org.apache.bcel.classfile.EmptyVisitor

visitMethod

public void visitMethod(org.apache.bcel.classfile.Method method)
Specified by:
visitMethod in interface org.apache.bcel.classfile.Visitor
Overrides:
visitMethod in class org.apache.bcel.classfile.EmptyVisitor