DescendingVisitor (Apache Commons BCEL 6.4.1 API)

org.apache.bcel.classfile

## Class DescendingVisitor

- java.lang.Object
- - org.apache.bcel.classfile.DescendingVisitor

- All Implemented Interfaces:
    Visitor

      public class DescendingVisitor
      extends Object
      implements Visitor

  Traverses a JavaClass with another Visitor object 'piggy-backed' that is applied to all components of a JavaClass object. I.e. this class supplies the traversal strategy, other classes can make use of it.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DescendingVisitor(JavaClass clazz, Visitor visitor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `current()`
    `Object` | `predecessor()`
    `Object` | `predecessor(int level)`
    `void` | `visit()` Start traversal.
    `void` | `visitAnnotation(Annotations annotation)`
    `void` | `visitAnnotationDefault(AnnotationDefault obj)`
    `void` | `visitAnnotationEntry(AnnotationEntry annotationEntry)`
    `void` | `visitBootstrapMethods(BootstrapMethods bm)`
    `void` | `visitCode(Code code)`
    `void` | `visitCodeException(CodeException ce)`
    `void` | `visitConstantClass(ConstantClass constant)`
    `void` | `visitConstantDouble(ConstantDouble constant)`
    `void` | `visitConstantDynamic(ConstantDynamic obj)`
    `void` | `visitConstantFieldref(ConstantFieldref constant)`
    `void` | `visitConstantFloat(ConstantFloat constant)`
    `void` | `visitConstantInteger(ConstantInteger constant)`
    `void` | `visitConstantInterfaceMethodref(ConstantInterfaceMethodref constant)`
    `void` | `visitConstantInvokeDynamic(ConstantInvokeDynamic constant)`
    `void` | `visitConstantLong(ConstantLong constant)`
    `void` | `visitConstantMethodHandle(ConstantMethodHandle obj)`
    `void` | `visitConstantMethodref(ConstantMethodref constant)`
    `void` | `visitConstantMethodType(ConstantMethodType obj)`
    `void` | `visitConstantModule(ConstantModule obj)`
    `void` | `visitConstantNameAndType(ConstantNameAndType constant)`
    `void` | `visitConstantPackage(ConstantPackage obj)`
    `void` | `visitConstantPool(ConstantPool cp)`
    `void` | `visitConstantString(ConstantString constant)`
    `void` | `visitConstantUtf8(ConstantUtf8 constant)`
    `void` | `visitConstantValue(ConstantValue cv)`
    `void` | `visitDeprecated(Deprecated attribute)`
    `void` | `visitEnclosingMethod(EnclosingMethod obj)`
    `void` | `visitExceptionTable(ExceptionTable table)`
    `void` | `visitField(Field field)`
    `void` | `visitInnerClass(InnerClass inner)`
    `void` | `visitInnerClasses(InnerClasses ic)`
    `void` | `visitJavaClass(JavaClass _clazz)`
    `void` | `visitLineNumber(LineNumber number)`
    `void` | `visitLineNumberTable(LineNumberTable table)`
    `void` | `visitLocalVariable(LocalVariable var)`
    `void` | `visitLocalVariableTable(LocalVariableTable table)`
    `void` | `visitLocalVariableTypeTable(LocalVariableTypeTable obj)`
    `void` | `visitMethod(Method method)`
    `void` | `visitMethodParameter(MethodParameter obj)`
    `void` | `visitMethodParameters(MethodParameters obj)`
    `void` | `visitModule(Module obj)`
    `void` | `visitModuleExports(ModuleExports obj)`
    `void` | `visitModuleMainClass(ModuleMainClass obj)`
    `void` | `visitModuleOpens(ModuleOpens obj)`
    `void` | `visitModulePackages(ModulePackages obj)`
    `void` | `visitModuleProvides(ModuleProvides obj)`
    `void` | `visitModuleRequires(ModuleRequires obj)`
    `void` | `visitNestHost(NestHost obj)`
    `void` | `visitNestMembers(NestMembers obj)`
    `void` | `visitParameterAnnotation(ParameterAnnotations obj)`
    `void` | `visitParameterAnnotationEntry(ParameterAnnotationEntry obj)`
    `void` | `visitSignature(Signature attribute)`
    `void` | `visitSourceFile(SourceFile attribute)`
    `void` | `visitStackMap(StackMap table)`
    `void` | `visitStackMapEntry(StackMapEntry var)`
    `void` | `visitSynthetic(Synthetic attribute)`
    `void` | `visitUnknown(Unknown attribute)`

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

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

- - ### Constructor Detail

    - #### DescendingVisitor

          public DescendingVisitor(JavaClass clazz,
                                   Visitor visitor)

      Parameters:
        `clazz` - Class to traverse
        `visitor` - visitor object to apply to all components

  - ### Method Detail

    - #### predecessor

          public Object predecessor()

      Returns:
        container of current entitity, i.e., predecessor during traversal

    - #### predecessor

          public Object predecessor(int level)

      Parameters:
        `level` - nesting level, i.e., 0 returns the direct predecessor
      Returns:
        container of current entitity, i.e., predecessor during traversal

    - #### current

          public Object current()

      Returns:
        current object

    - #### visit

          public void visit()

      Start traversal.

    - #### visitJavaClass

          public void visitJavaClass(JavaClass _clazz)

      Specified by:
        `visitJavaClass` in interface `Visitor`

    - #### visitAnnotation

          public void visitAnnotation(Annotations annotation)

      Specified by:
        `visitAnnotation` in interface `Visitor`
      Since:
        6.0

    - #### visitAnnotationEntry

          public void visitAnnotationEntry(AnnotationEntry annotationEntry)

      Specified by:
        `visitAnnotationEntry` in interface `Visitor`
      Since:
        6.0

    - #### visitField

          public void visitField(Field field)

      Specified by:
        `visitField` in interface `Visitor`

    - #### visitConstantValue

          public void visitConstantValue(ConstantValue cv)

      Specified by:
        `visitConstantValue` in interface `Visitor`

    - #### visitMethod

          public void visitMethod(Method method)

      Specified by:
        `visitMethod` in interface `Visitor`

    - #### visitExceptionTable

          public void visitExceptionTable(ExceptionTable table)

      Specified by:
        `visitExceptionTable` in interface `Visitor`

    - #### visitCode

          public void visitCode(Code code)

      Specified by:
        `visitCode` in interface `Visitor`

    - #### visitCodeException

          public void visitCodeException(CodeException ce)

      Specified by:
        `visitCodeException` in interface `Visitor`

    - #### visitLineNumberTable

          public void visitLineNumberTable(LineNumberTable table)

      Specified by:
        `visitLineNumberTable` in interface `Visitor`

    - #### visitLineNumber

          public void visitLineNumber(LineNumber number)

      Specified by:
        `visitLineNumber` in interface `Visitor`

    - #### visitLocalVariableTable

          public void visitLocalVariableTable(LocalVariableTable table)

      Specified by:
        `visitLocalVariableTable` in interface `Visitor`

    - #### visitStackMap

          public void visitStackMap(StackMap table)

      Specified by:
        `visitStackMap` in interface `Visitor`

    - #### visitStackMapEntry

          public void visitStackMapEntry(StackMapEntry var)

      Specified by:
        `visitStackMapEntry` in interface `Visitor`

    - #### visitLocalVariable

          public void visitLocalVariable(LocalVariable var)

      Specified by:
        `visitLocalVariable` in interface `Visitor`

    - #### visitConstantPool

          public void visitConstantPool(ConstantPool cp)

      Specified by:
        `visitConstantPool` in interface `Visitor`

    - #### visitConstantClass

          public void visitConstantClass(ConstantClass constant)

      Specified by:
        `visitConstantClass` in interface `Visitor`

    - #### visitConstantDouble

          public void visitConstantDouble(ConstantDouble constant)

      Specified by:
        `visitConstantDouble` in interface `Visitor`

    - #### visitConstantFieldref

          public void visitConstantFieldref(ConstantFieldref constant)

      Specified by:
        `visitConstantFieldref` in interface `Visitor`

    - #### visitConstantFloat

          public void visitConstantFloat(ConstantFloat constant)

      Specified by:
        `visitConstantFloat` in interface `Visitor`

    - #### visitConstantInteger

          public void visitConstantInteger(ConstantInteger constant)

      Specified by:
        `visitConstantInteger` in interface `Visitor`

    - #### visitConstantInterfaceMethodref

          public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref constant)

      Specified by:
        `visitConstantInterfaceMethodref` in interface `Visitor`

    - #### visitConstantInvokeDynamic

          public void visitConstantInvokeDynamic(ConstantInvokeDynamic constant)

      Specified by:
        `visitConstantInvokeDynamic` in interface `Visitor`
      Since:
        6.0

    - #### visitConstantLong

          public void visitConstantLong(ConstantLong constant)

      Specified by:
        `visitConstantLong` in interface `Visitor`

    - #### visitConstantMethodref

          public void visitConstantMethodref(ConstantMethodref constant)

      Specified by:
        `visitConstantMethodref` in interface `Visitor`

    - #### visitConstantNameAndType

          public void visitConstantNameAndType(ConstantNameAndType constant)

      Specified by:
        `visitConstantNameAndType` in interface `Visitor`

    - #### visitConstantString

          public void visitConstantString(ConstantString constant)

      Specified by:
        `visitConstantString` in interface `Visitor`

    - #### visitConstantUtf8

          public void visitConstantUtf8(ConstantUtf8 constant)

      Specified by:
        `visitConstantUtf8` in interface `Visitor`

    - #### visitInnerClasses

          public void visitInnerClasses(InnerClasses ic)

      Specified by:
        `visitInnerClasses` in interface `Visitor`

    - #### visitInnerClass

          public void visitInnerClass(InnerClass inner)

      Specified by:
        `visitInnerClass` in interface `Visitor`

    - #### visitBootstrapMethods

          public void visitBootstrapMethods(BootstrapMethods bm)

      Specified by:
        `visitBootstrapMethods` in interface `Visitor`
      Since:
        6.0

    - #### visitDeprecated

          public void visitDeprecated(Deprecated attribute)

      Specified by:
        `visitDeprecated` in interface `Visitor`

    - #### visitSignature

          public void visitSignature(Signature attribute)

      Specified by:
        `visitSignature` in interface `Visitor`

    - #### visitSourceFile

          public void visitSourceFile(SourceFile attribute)

      Specified by:
        `visitSourceFile` in interface `Visitor`

    - #### visitSynthetic

          public void visitSynthetic(Synthetic attribute)

      Specified by:
        `visitSynthetic` in interface `Visitor`

    - #### visitUnknown

          public void visitUnknown(Unknown attribute)

      Specified by:
        `visitUnknown` in interface `Visitor`

    - #### visitAnnotationDefault

          public void visitAnnotationDefault(AnnotationDefault obj)

      Specified by:
        `visitAnnotationDefault` in interface `Visitor`
      Since:
        6.0

    - #### visitEnclosingMethod

          public void visitEnclosingMethod(EnclosingMethod obj)

      Specified by:
        `visitEnclosingMethod` in interface `Visitor`
      Since:
        6.0

    - #### visitLocalVariableTypeTable

          public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)

      Specified by:
        `visitLocalVariableTypeTable` in interface `Visitor`
      Since:
        6.0

    - #### visitParameterAnnotation

          public void visitParameterAnnotation(ParameterAnnotations obj)

      Specified by:
        `visitParameterAnnotation` in interface `Visitor`
      Since:
        6.0

    - #### visitMethodParameters

          public void visitMethodParameters(MethodParameters obj)

      Specified by:
        `visitMethodParameters` in interface `Visitor`
      Since:
        6.0

    - #### visitMethodParameter

          public void visitMethodParameter(MethodParameter obj)

      Specified by:
        `visitMethodParameter` in interface `Visitor`
      Since:
        6.4.0

    - #### visitConstantMethodType

          public void visitConstantMethodType(ConstantMethodType obj)

      Specified by:
        `visitConstantMethodType` in interface `Visitor`
      Since:
        6.0

    - #### visitConstantMethodHandle

          public void visitConstantMethodHandle(ConstantMethodHandle obj)

      Specified by:
        `visitConstantMethodHandle` in interface `Visitor`
      Since:
        6.0

    - #### visitParameterAnnotationEntry

          public void visitParameterAnnotationEntry(ParameterAnnotationEntry obj)

      Specified by:
        `visitParameterAnnotationEntry` in interface `Visitor`
      Since:
        6.0

    - #### visitConstantPackage

          public void visitConstantPackage(ConstantPackage obj)

      Specified by:
        `visitConstantPackage` in interface `Visitor`
      Since:
        6.1

    - #### visitConstantModule

          public void visitConstantModule(ConstantModule obj)

      Specified by:
        `visitConstantModule` in interface `Visitor`
      Since:
        6.1

    - #### visitConstantDynamic

          public void visitConstantDynamic(ConstantDynamic obj)

      Specified by:
        `visitConstantDynamic` in interface `Visitor`
      Since:
        6.3

    - #### visitModule

          public void visitModule(Module obj)

      Specified by:
        `visitModule` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModuleRequires

          public void visitModuleRequires(ModuleRequires obj)

      Specified by:
        `visitModuleRequires` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModuleExports

          public void visitModuleExports(ModuleExports obj)

      Specified by:
        `visitModuleExports` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModuleOpens

          public void visitModuleOpens(ModuleOpens obj)

      Specified by:
        `visitModuleOpens` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModuleProvides

          public void visitModuleProvides(ModuleProvides obj)

      Specified by:
        `visitModuleProvides` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModulePackages

          public void visitModulePackages(ModulePackages obj)

      Specified by:
        `visitModulePackages` in interface `Visitor`
      Since:
        6.4.0

    - #### visitModuleMainClass

          public void visitModuleMainClass(ModuleMainClass obj)

      Specified by:
        `visitModuleMainClass` in interface `Visitor`
      Since:
        6.4.0

    - #### visitNestHost

          public void visitNestHost(NestHost obj)

      Specified by:
        `visitNestHost` in interface `Visitor`
      Since:
        6.4.0

    - #### visitNestMembers

          public void visitNestMembers(NestMembers obj)

      Specified by:
        `visitNestMembers` in interface `Visitor`
      Since:
        6.4.0

Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.