org.apache.tools.ant.util.depend.bcelClass DependencyVisitor
- java.lang.Object
- org.apache.bcel.classfile.EmptyVisitor
- org.apache.tools.ant.util.depend.bcel.DependencyVisitor
- All Implemented Interfaces:
- org.apache.bcel.classfile.Visitor
public class DependencyVisitor extends org.apache.bcel.classfile.EmptyVisitor
A BCEL visitor implementation to collect class dependency information
Constructor Summary
Constructors Constructor and Description DependencyVisitor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clearDependencies()
Clear the current set of collected dependencies.java.util.Enumeration<java.lang.String>
getDependencies()
Get the dependencies collected by this visitorvoid
visitConstantClass(org.apache.bcel.classfile.ConstantClass constantClass)
Visit a class referencevoid
visitConstantNameAndType(org.apache.bcel.classfile.ConstantNameAndType obj)
Visit a name and type ref Look for class references in thisvoid
visitConstantPool(org.apache.bcel.classfile.ConstantPool constantPool)
Visit the constant pool of a classvoid
visitField(org.apache.bcel.classfile.Field field)
Visit a field of the class.void
visitJavaClass(org.apache.bcel.classfile.JavaClass javaClass)
Visit a Java classvoid
visitMethod(org.apache.bcel.classfile.Method method)
Visit a method of the current class
Methods inherited from class org.apache.bcel.classfile.EmptyVisitor
visitCode, visitCodeException, visitConstantDouble, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantLong, visitConstantMethodref, visitConstantString, visitConstantUtf8, visitConstantValue, visitDeprecated, visitExceptionTable, visitInnerClass, visitInnerClasses, visitLineNumber, visitLineNumberTable, visitLocalVariable, visitLocalVariableTable, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitSynthetic, visitUnknown
Method Detail
getDependencies
public java.util.Enumeration<java.lang.String> getDependencies()Get the dependencies collected by this visitor
- Returns:
- a Enumeration of classnames, being the classes upon which the visited classes depend.
clearDependencies
public void clearDependencies()Clear the current set of collected dependencies.
visitConstantPool
public void visitConstantPool(org.apache.bcel.classfile.ConstantPool constantPool)Visit the constant pool of a class
- Specified by:
visitConstantPool
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitConstantPool
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
constantPool
- the constant pool of the class being visited.
visitConstantClass
public void visitConstantClass(org.apache.bcel.classfile.ConstantClass constantClass)Visit a class reference
- Specified by:
visitConstantClass
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitConstantClass
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
constantClass
- the constantClass entry for the class reference
visitConstantNameAndType
public void visitConstantNameAndType(org.apache.bcel.classfile.ConstantNameAndType obj)Visit a name and type ref Look for class references in this
- Specified by:
visitConstantNameAndType
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitConstantNameAndType
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
obj
- the name and type reference being visited.
visitField
public void visitField(org.apache.bcel.classfile.Field field)Visit a field of the class.
- Specified by:
visitField
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitField
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
field
- the field being visited
visitJavaClass
public void visitJavaClass(org.apache.bcel.classfile.JavaClass javaClass)Visit a Java class
- Specified by:
visitJavaClass
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitJavaClass
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
javaClass
- the class being visited.
visitMethod
public void visitMethod(org.apache.bcel.classfile.Method method)Visit a method of the current class
- Specified by:
visitMethod
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitMethod
in classorg.apache.bcel.classfile.EmptyVisitor
- Parameters:
method
- the method being visited.