Class 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the current set of collected dependencies.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 classMethods inherited from class org.apache.bcel.classfile.EmptyVisitor
visitAnnotation, visitAnnotationDefault, visitAnnotationEntry, visitBootstrapMethods, visitCode, visitCodeException, visitConstantDouble, visitConstantDynamic, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantInvokeDynamic, visitConstantLong, visitConstantMethodHandle, visitConstantMethodref, visitConstantMethodType, visitConstantModule, visitConstantPackage, visitConstantString, visitConstantUtf8, visitConstantValue, visitDeprecated, visitEnclosingMethod, visitExceptionTable, visitInnerClass, visitInnerClasses, visitLineNumber, visitLineNumberTable, visitLocalVariable, visitLocalVariableTable, visitLocalVariableTypeTable, visitMethodParameter, visitMethodParameters, visitModule, visitModuleExports, visitModuleMainClass, visitModuleOpens, visitModulePackages, visitModuleProvides, visitModuleRequires, visitNestHost, visitNestMembers, visitParameterAnnotation, visitParameterAnnotationEntry, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitStackMapType, visitSynthetic, visitUnknown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.bcel.classfile.Visitor
visitRecord, visitRecordComponent
-
Constructor Details
-
DependencyVisitor
public DependencyVisitor()
-
-
Method Details
-
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.
-