Package org.apache.bcel.classfile
Class DescendingVisitor
- java.lang.Object
-
- org.apache.bcel.classfile.DescendingVisitor
-
- All Implemented Interfaces:
Visitor
public class DescendingVisitor extends java.lang.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 Description DescendingVisitor(JavaClass clazz, Visitor visitor)
-
Method Summary
-
-
-
Method Detail
-
predecessor
public java.lang.Object predecessor()
- Returns:
- container of current entitity, i.e., predecessor during traversal
-
predecessor
public java.lang.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 java.lang.Object current()
- Returns:
- current object
-
visit
public void visit()
Start traversal.
-
visitJavaClass
public void visitJavaClass(JavaClass _clazz)
- Specified by:
visitJavaClass
in interfaceVisitor
-
visitAnnotation
public void visitAnnotation(Annotations annotation)
- Specified by:
visitAnnotation
in interfaceVisitor
- Since:
- 6.0
-
visitAnnotationEntry
public void visitAnnotationEntry(AnnotationEntry annotationEntry)
- Specified by:
visitAnnotationEntry
in interfaceVisitor
- Since:
- 6.0
-
visitField
public void visitField(Field field)
- Specified by:
visitField
in interfaceVisitor
-
visitConstantValue
public void visitConstantValue(ConstantValue cv)
- Specified by:
visitConstantValue
in interfaceVisitor
-
visitMethod
public void visitMethod(Method method)
- Specified by:
visitMethod
in interfaceVisitor
-
visitExceptionTable
public void visitExceptionTable(ExceptionTable table)
- Specified by:
visitExceptionTable
in interfaceVisitor
-
visitCodeException
public void visitCodeException(CodeException ce)
- Specified by:
visitCodeException
in interfaceVisitor
-
visitLineNumberTable
public void visitLineNumberTable(LineNumberTable table)
- Specified by:
visitLineNumberTable
in interfaceVisitor
-
visitLineNumber
public void visitLineNumber(LineNumber number)
- Specified by:
visitLineNumber
in interfaceVisitor
-
visitLocalVariableTable
public void visitLocalVariableTable(LocalVariableTable table)
- Specified by:
visitLocalVariableTable
in interfaceVisitor
-
visitStackMap
public void visitStackMap(StackMap table)
- Specified by:
visitStackMap
in interfaceVisitor
-
visitStackMapEntry
public void visitStackMapEntry(StackMapEntry var)
- Specified by:
visitStackMapEntry
in interfaceVisitor
-
visitLocalVariable
public void visitLocalVariable(LocalVariable var)
- Specified by:
visitLocalVariable
in interfaceVisitor
-
visitConstantPool
public void visitConstantPool(ConstantPool cp)
- Specified by:
visitConstantPool
in interfaceVisitor
-
visitConstantClass
public void visitConstantClass(ConstantClass constant)
- Specified by:
visitConstantClass
in interfaceVisitor
-
visitConstantDouble
public void visitConstantDouble(ConstantDouble constant)
- Specified by:
visitConstantDouble
in interfaceVisitor
-
visitConstantFieldref
public void visitConstantFieldref(ConstantFieldref constant)
- Specified by:
visitConstantFieldref
in interfaceVisitor
-
visitConstantFloat
public void visitConstantFloat(ConstantFloat constant)
- Specified by:
visitConstantFloat
in interfaceVisitor
-
visitConstantInteger
public void visitConstantInteger(ConstantInteger constant)
- Specified by:
visitConstantInteger
in interfaceVisitor
-
visitConstantInterfaceMethodref
public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref constant)
- Specified by:
visitConstantInterfaceMethodref
in interfaceVisitor
-
visitConstantInvokeDynamic
public void visitConstantInvokeDynamic(ConstantInvokeDynamic constant)
- Specified by:
visitConstantInvokeDynamic
in interfaceVisitor
- Since:
- 6.0
-
visitConstantLong
public void visitConstantLong(ConstantLong constant)
- Specified by:
visitConstantLong
in interfaceVisitor
-
visitConstantMethodref
public void visitConstantMethodref(ConstantMethodref constant)
- Specified by:
visitConstantMethodref
in interfaceVisitor
-
visitConstantNameAndType
public void visitConstantNameAndType(ConstantNameAndType constant)
- Specified by:
visitConstantNameAndType
in interfaceVisitor
-
visitConstantString
public void visitConstantString(ConstantString constant)
- Specified by:
visitConstantString
in interfaceVisitor
-
visitConstantUtf8
public void visitConstantUtf8(ConstantUtf8 constant)
- Specified by:
visitConstantUtf8
in interfaceVisitor
-
visitInnerClasses
public void visitInnerClasses(InnerClasses ic)
- Specified by:
visitInnerClasses
in interfaceVisitor
-
visitInnerClass
public void visitInnerClass(InnerClass inner)
- Specified by:
visitInnerClass
in interfaceVisitor
-
visitBootstrapMethods
public void visitBootstrapMethods(BootstrapMethods bm)
- Specified by:
visitBootstrapMethods
in interfaceVisitor
- Since:
- 6.0
-
visitDeprecated
public void visitDeprecated(Deprecated attribute)
- Specified by:
visitDeprecated
in interfaceVisitor
-
visitSignature
public void visitSignature(Signature attribute)
- Specified by:
visitSignature
in interfaceVisitor
-
visitSourceFile
public void visitSourceFile(SourceFile attribute)
- Specified by:
visitSourceFile
in interfaceVisitor
-
visitSynthetic
public void visitSynthetic(Synthetic attribute)
- Specified by:
visitSynthetic
in interfaceVisitor
-
visitUnknown
public void visitUnknown(Unknown attribute)
- Specified by:
visitUnknown
in interfaceVisitor
-
visitAnnotationDefault
public void visitAnnotationDefault(AnnotationDefault obj)
- Specified by:
visitAnnotationDefault
in interfaceVisitor
- Since:
- 6.0
-
visitEnclosingMethod
public void visitEnclosingMethod(EnclosingMethod obj)
- Specified by:
visitEnclosingMethod
in interfaceVisitor
- Since:
- 6.0
-
visitLocalVariableTypeTable
public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
- Specified by:
visitLocalVariableTypeTable
in interfaceVisitor
- Since:
- 6.0
-
visitParameterAnnotation
public void visitParameterAnnotation(ParameterAnnotations obj)
- Specified by:
visitParameterAnnotation
in interfaceVisitor
- Since:
- 6.0
-
visitMethodParameters
public void visitMethodParameters(MethodParameters obj)
- Specified by:
visitMethodParameters
in interfaceVisitor
- Since:
- 6.0
-
visitMethodParameter
public void visitMethodParameter(MethodParameter obj)
- Specified by:
visitMethodParameter
in interfaceVisitor
- Since:
- 6.4.0
-
visitConstantMethodType
public void visitConstantMethodType(ConstantMethodType obj)
- Specified by:
visitConstantMethodType
in interfaceVisitor
- Since:
- 6.0
-
visitConstantMethodHandle
public void visitConstantMethodHandle(ConstantMethodHandle obj)
- Specified by:
visitConstantMethodHandle
in interfaceVisitor
- Since:
- 6.0
-
visitParameterAnnotationEntry
public void visitParameterAnnotationEntry(ParameterAnnotationEntry obj)
- Specified by:
visitParameterAnnotationEntry
in interfaceVisitor
- Since:
- 6.0
-
visitConstantPackage
public void visitConstantPackage(ConstantPackage obj)
- Specified by:
visitConstantPackage
in interfaceVisitor
- Since:
- 6.1
-
visitConstantModule
public void visitConstantModule(ConstantModule obj)
- Specified by:
visitConstantModule
in interfaceVisitor
- Since:
- 6.1
-
visitConstantDynamic
public void visitConstantDynamic(ConstantDynamic obj)
- Specified by:
visitConstantDynamic
in interfaceVisitor
- Since:
- 6.3
-
visitModule
public void visitModule(Module obj)
- Specified by:
visitModule
in interfaceVisitor
- Since:
- 6.4.0
-
visitModuleRequires
public void visitModuleRequires(ModuleRequires obj)
- Specified by:
visitModuleRequires
in interfaceVisitor
- Since:
- 6.4.0
-
visitModuleExports
public void visitModuleExports(ModuleExports obj)
- Specified by:
visitModuleExports
in interfaceVisitor
- Since:
- 6.4.0
-
visitModuleOpens
public void visitModuleOpens(ModuleOpens obj)
- Specified by:
visitModuleOpens
in interfaceVisitor
- Since:
- 6.4.0
-
visitModuleProvides
public void visitModuleProvides(ModuleProvides obj)
- Specified by:
visitModuleProvides
in interfaceVisitor
- Since:
- 6.4.0
-
visitModulePackages
public void visitModulePackages(ModulePackages obj)
- Specified by:
visitModulePackages
in interfaceVisitor
- Since:
- 6.4.0
-
visitModuleMainClass
public void visitModuleMainClass(ModuleMainClass obj)
- Specified by:
visitModuleMainClass
in interfaceVisitor
- Since:
- 6.4.0
-
visitNestHost
public void visitNestHost(NestHost obj)
- Specified by:
visitNestHost
in interfaceVisitor
- Since:
- 6.4.0
-
visitNestMembers
public void visitNestMembers(NestMembers obj)
- Specified by:
visitNestMembers
in interfaceVisitor
- Since:
- 6.4.0
-
-