Package org.apache.tools.ant.util.depend.bcel

# 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

  Constructors
  Constructor
  Description
  `DependencyVisitor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearDependencies()`
  Clear the current set of collected dependencies.
  `Enumeration<String>`
  `getDependencies()`
  Get the dependencies collected by this visitor
  `void`
  `visitConstantClass(org.apache.bcel.classfile.ConstantClass constantClass)`
  Visit a class reference
  `void`
  `visitConstantNameAndType(org.apache.bcel.classfile.ConstantNameAndType obj)`
  Visit a name and type ref Look for class references in this
  `void`
  `visitConstantPool(org.apache.bcel.classfile.ConstantPool constantPool)`
  Visit the constant pool of a class
  `void`
  `visitField(org.apache.bcel.classfile.Field field)`
  Visit a field of the class.
  `void`
  `visitJavaClass(org.apache.bcel.classfile.JavaClass javaClass)`
  Visit a Java class
  `void`
  `visitMethod(org.apache.bcel.classfile.Method method)`
  Visit a method of the current class

  ### Methods 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, visitSynthetic, visitUnknown`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DependencyVisitor

    public DependencyVisitor()

- ## Method Details

  - ### getDependencies

    public Enumeration<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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitConstantPool` in class `org.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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitConstantClass` in class `org.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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitConstantNameAndType` in class `org.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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitField` in class `org.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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitJavaClass` in class `org.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 interface `org.apache.bcel.classfile.Visitor`
    Overrides:
      `visitMethod` in class `org.apache.bcel.classfile.EmptyVisitor`
    Parameters:
      `method` - the method being visited.