Package serp.bytecode.visitor

# Class BCVisitor

java.lang.Object
serp.bytecode.visitor.BCVisitor

Direct Known Subclasses:
  `PrettyPrintVisitor`

public class BCVisitor extends Object
Base class for visitors on a bytecode entity. The public `visit(serp.bytecode.visitor.VisitAcceptor)` method will traverse the object graph of the given entity, calling the `enter*` and `exit*` methods as it visits each object. The traversal is done depth-first. Subclasses should override only the methods for visiting the entities they are interested in. Whenever there is a general method (i.e. `enter/exitEntry`) as well as a more specific one (i.e. `enter/exitStringEntry`), the more general method will be called first, followed by a call on the correct specific method. Most subclasses will override either the general or specific cases, but not both.

Author:
  Abe White

## Constructor Summary

Constructors
Constructor
Description
`BCVisitor()`

## Method Summary

Modifier and Type
Method
Description
`void`
`enterAnnotation(Annotation obj)`
`void`
`enterAnnotationProperty(Annotation.Property obj)`
`void`
`enterAnnotations(Annotations obj)`
`void`
`enterArrayLoadInstruction(ArrayLoadInstruction obj)`
`void`
`enterArrayStoreInstruction(ArrayStoreInstruction obj)`
`void`
`enterAttribute(Attribute obj)`
`void`
`enterBCClass(BCClass obj)`
`void`
`enterBCField(BCField obj)`
`void`
`enterBCMember(BCMember obj)`
`void`
`enterBCMethod(BCMethod obj)`
`void`
`enterBootstrapMethod(BootstrapMethods obj)`
`void`
`enterClassEntry(ClassEntry obj)`
`void`
`enterClassInstruction(ClassInstruction obj)`
`void`
`enterCmpInstruction(CmpInstruction obj)`
`void`
`enterCode(Code obj)`
`void`
`enterConstantInstruction(ConstantInstruction obj)`
`void`
`enterConstantPool(ConstantPool obj)`
`void`
`enterConstantValue(ConstantValue obj)`
`void`
`enterConvertInstruction(ConvertInstruction obj)`
`void`
`enterDeprecated(Deprecated obj)`
`void`
`enterDoubleEntry(DoubleEntry obj)`
`void`
`enterEntry(Entry obj)`
`void`
`enterExceptionHandler(ExceptionHandler obj)`
`void`
`enterExceptions(Exceptions obj)`
`void`
`enterFieldEntry(FieldEntry obj)`
`void`
`enterFloatEntry(FloatEntry obj)`
`void`
`enterGetFieldInstruction(GetFieldInstruction obj)`
`void`
`enterIfInstruction(IfInstruction obj)`
`void`
`enterIIncInstruction(IIncInstruction obj)`
`void`
`enterInnerClass(InnerClass obj)`
`void`
`enterInnerClasses(InnerClasses obj)`
`void`
`enterInstruction(Instruction obj)`
`void`
`enterIntEntry(IntEntry obj)`
`void`
`enterInterfaceMethodEntry(InterfaceMethodEntry obj)`
`void`
`enterInvokeDynamicEntry(InvokeDynamicEntry obj)`
`void`
`enterJumpInstruction(JumpInstruction obj)`
`void`
`enterLineNumber(LineNumber obj)`
`void`
`enterLineNumberTable(LineNumberTable obj)`
`void`
`enterLoadInstruction(LoadInstruction obj)`
`void`
`enterLocalVariable(LocalVariable obj)`
`void`
`enterLocalVariableTable(LocalVariableTable obj)`
`void`
`enterLocalVariableType(LocalVariableType obj)`
`void`
`enterLocalVariableTypeTable(LocalVariableTypeTable obj)`
`void`
`enterLongEntry(LongEntry obj)`
`void`
`enterLookupSwitchInstruction(LookupSwitchInstruction obj)`
`void`
`enterMathInstruction(MathInstruction obj)`
`void`
`enterMethodEntry(MethodEntry obj)`
`void`
`enterMethodHandleEntry(MethodHandleEntry obj)`
`void`
`enterMethodInstruction(MethodInstruction obj)`
`void`
`enterMethodTypeEntry(MethodTypeEntry obj)`
`void`
`enterMonitorEnterInstruction(MonitorEnterInstruction obj)`
`void`
`enterMonitorExitInstruction(MonitorExitInstruction obj)`
`void`
`enterMultiANewArrayInstruction(MultiANewArrayInstruction obj)`
`void`
`enterNameAndTypeEntry(NameAndTypeEntry obj)`
`void`
`enterNewArrayInstruction(NewArrayInstruction obj)`
`void`
`enterProject(Project obj)`
`void`
`enterPutFieldInstruction(PutFieldInstruction obj)`
`void`
`enterRetInstruction(RetInstruction obj)`
`void`
`enterReturnInstruction(ReturnInstruction obj)`
`void`
`enterSourceFile(SourceFile obj)`
`void`
`enterStackInstruction(StackInstruction obj)`
`void`
`enterStoreInstruction(StoreInstruction obj)`
`void`
`enterStringEntry(StringEntry obj)`
`void`
`enterSynthetic(Synthetic obj)`
`void`
`enterTableSwitchInstruction(TableSwitchInstruction obj)`
`void`
`enterUnknownAttribute(UnknownAttribute obj)`
`void`
`enterUTF8Entry(UTF8Entry obj)`
`void`
`enterWideInstruction(WideInstruction obj)`
`void`
`exitAnnotation(Annotation obj)`
`void`
`exitAnnotationProperty(Annotation.Property obj)`
`void`
`exitAnnotations(Annotations obj)`
`void`
`exitArrayLoadInstruction(ArrayLoadInstruction obj)`
`void`
`exitArrayStoreInstruction(ArrayStoreInstruction obj)`
`void`
`exitAttribute(Attribute obj)`
`void`
`exitBCClass(BCClass obj)`
`void`
`exitBCField(BCField obj)`
`void`
`exitBCMember(BCMember obj)`
`void`
`exitBCMethod(BCMethod obj)`
`void`
`exitBootstrapMethod(BootstrapMethods obj)`
`void`
`exitClassEntry(ClassEntry obj)`
`void`
`exitClassInstruction(ClassInstruction obj)`
`void`
`exitCmpInstruction(CmpInstruction obj)`
`void`
`exitCode(Code obj)`
`void`
`exitConstantInstruction(ConstantInstruction obj)`
`void`
`exitConstantPool(ConstantPool obj)`
`void`
`exitConstantValue(ConstantValue obj)`
`void`
`exitConvertInstruction(ConvertInstruction obj)`
`void`
`exitDeprecated(Deprecated obj)`
`void`
`exitDoubleEntry(DoubleEntry obj)`
`void`
`exitEntry(Entry obj)`
`void`
`exitExceptionHandler(ExceptionHandler obj)`
`void`
`exitExceptions(Exceptions obj)`
`void`
`exitFieldEntry(FieldEntry obj)`
`void`
`exitFloatEntry(FloatEntry obj)`
`void`
`exitGetFieldInstruction(GetFieldInstruction obj)`
`void`
`exitIfInstruction(IfInstruction obj)`
`void`
`exitIIncInstruction(IIncInstruction obj)`
`void`
`exitInnerClass(InnerClass obj)`
`void`
`exitInnerClasses(InnerClasses obj)`
`void`
`exitInstruction(Instruction obj)`
`void`
`exitIntEntry(IntEntry obj)`
`void`
`exitInterfaceMethodEntry(InterfaceMethodEntry obj)`
`void`
`exitInvokeDynamicEntry(InvokeDynamicEntry obj)`
`void`
`exitJumpInstruction(JumpInstruction obj)`
`void`
`exitLineNumber(LineNumber obj)`
`void`
`exitLineNumberTable(LineNumberTable obj)`
`void`
`exitLoadInstruction(LoadInstruction obj)`
`void`
`exitLocalVariable(LocalVariable obj)`
`void`
`exitLocalVariableTable(LocalVariableTable obj)`
`void`
`exitLocalVariableType(LocalVariableType obj)`
`void`
`exitLocalVariableTypeTable(LocalVariableTypeTable obj)`
`void`
`exitLongEntry(LongEntry obj)`
`void`
`exitLookupSwitchInstruction(LookupSwitchInstruction obj)`
`void`
`exitMathInstruction(MathInstruction obj)`
`void`
`exitMethodEntry(MethodEntry obj)`
`void`
`exitMethodHandleEntry(MethodHandleEntry obj)`
`void`
`exitMethodInstruction(MethodInstruction obj)`
`void`
`exitMethodTypeEntry(MethodTypeEntry obj)`
`void`
`exitMonitorEnterInstruction(MonitorEnterInstruction obj)`
`void`
`exitMonitorExitInstruction(MonitorExitInstruction obj)`
`void`
`exitMultiANewArrayInstruction(MultiANewArrayInstruction obj)`
`void`
`exitNameAndTypeEntry(NameAndTypeEntry obj)`
`void`
`exitNewArrayInstruction(NewArrayInstruction obj)`
`void`
`exitProject(Project obj)`
`void`
`exitPutFieldInstruction(PutFieldInstruction obj)`
`void`
`exitRetInstruction(RetInstruction obj)`
`void`
`exitReturnInstruction(ReturnInstruction obj)`
`void`
`exitSourceFile(SourceFile obj)`
`void`
`exitStackInstruction(StackInstruction obj)`
`void`
`exitStoreInstruction(StoreInstruction obj)`
`void`
`exitStringEntry(StringEntry obj)`
`void`
`exitSynthetic(Synthetic obj)`
`void`
`exitTableSwitchInstruction(TableSwitchInstruction obj)`
`void`
`exitUnknownAttribute(UnknownAttribute obj)`
`void`
`exitUTF8Entry(UTF8Entry obj)`
`void`
`exitWideInstruction(WideInstruction obj)`
`void`
`visit(VisitAcceptor obj)`
Visit the given entity.

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

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

## Constructor Details

### BCVisitor

public BCVisitor()

## Method Details

### visit

public void visit(VisitAcceptor obj)
Visit the given entity.

### enterProject

public void enterProject(Project obj)

### exitProject

public void exitProject(Project obj)

### enterBCClass

public void enterBCClass(BCClass obj)

### exitBCClass

public void exitBCClass(BCClass obj)

### enterBCMember

public void enterBCMember(BCMember obj)

### exitBCMember

public void exitBCMember(BCMember obj)

### enterBCField

public void enterBCField(BCField obj)

### exitBCField

public void exitBCField(BCField obj)

### enterBCMethod

public void enterBCMethod(BCMethod obj)

### exitBCMethod

public void exitBCMethod(BCMethod obj)

### enterAttribute

public void enterAttribute(Attribute obj)

### exitAttribute

public void exitAttribute(Attribute obj)

### enterConstantValue

public void enterConstantValue(ConstantValue obj)

### exitConstantValue

public void exitConstantValue(ConstantValue obj)

### enterDeprecated

public void enterDeprecated(Deprecated obj)

### exitDeprecated

public void exitDeprecated(Deprecated obj)

### enterExceptions

public void enterExceptions(Exceptions obj)

### exitExceptions

public void exitExceptions(Exceptions obj)

### enterInnerClasses

public void enterInnerClasses(InnerClasses obj)

### exitInnerClasses

public void exitInnerClasses(InnerClasses obj)

### enterLineNumberTable

public void enterLineNumberTable(LineNumberTable obj)

### exitLineNumberTable

public void exitLineNumberTable(LineNumberTable obj)

### enterLocalVariableTable

public void enterLocalVariableTable(LocalVariableTable obj)

### exitLocalVariableTable

public void exitLocalVariableTable(LocalVariableTable obj)

### enterLocalVariableTypeTable

public void enterLocalVariableTypeTable(LocalVariableTypeTable obj)

### exitLocalVariableTypeTable

public void exitLocalVariableTypeTable(LocalVariableTypeTable obj)

### enterAnnotations

public void enterAnnotations(Annotations obj)

### exitAnnotations

public void exitAnnotations(Annotations obj)

### enterAnnotation

public void enterAnnotation(Annotation obj)

### exitAnnotation

public void exitAnnotation(Annotation obj)

### enterAnnotationProperty

public void enterAnnotationProperty(Annotation.Property obj)

### exitAnnotationProperty

public void exitAnnotationProperty(Annotation.Property obj)

### enterSourceFile

public void enterSourceFile(SourceFile obj)

### exitSourceFile

public void exitSourceFile(SourceFile obj)

### enterSynthetic

public void enterSynthetic(Synthetic obj)

### exitSynthetic

public void exitSynthetic(Synthetic obj)

### enterUnknownAttribute

public void enterUnknownAttribute(UnknownAttribute obj)

### exitUnknownAttribute

public void exitUnknownAttribute(UnknownAttribute obj)

### enterCode

public void enterCode(Code obj)

### exitCode

public void exitCode(Code obj)

### enterExceptionHandler

public void enterExceptionHandler(ExceptionHandler obj)

### exitExceptionHandler

public void exitExceptionHandler(ExceptionHandler obj)

### enterInnerClass

public void enterInnerClass(InnerClass obj)

### exitInnerClass

public void exitInnerClass(InnerClass obj)

### enterLineNumber

public void enterLineNumber(LineNumber obj)

### exitLineNumber

public void exitLineNumber(LineNumber obj)

### enterLocalVariable

public void enterLocalVariable(LocalVariable obj)

### exitLocalVariable

public void exitLocalVariable(LocalVariable obj)

### enterLocalVariableType

public void enterLocalVariableType(LocalVariableType obj)

### exitLocalVariableType

public void exitLocalVariableType(LocalVariableType obj)

### enterInstruction

public void enterInstruction(Instruction obj)

### exitInstruction

public void exitInstruction(Instruction obj)

### enterArrayLoadInstruction

public void enterArrayLoadInstruction(ArrayLoadInstruction obj)

### exitArrayLoadInstruction

public void exitArrayLoadInstruction(ArrayLoadInstruction obj)

### enterArrayStoreInstruction

public void enterArrayStoreInstruction(ArrayStoreInstruction obj)

### exitArrayStoreInstruction

public void exitArrayStoreInstruction(ArrayStoreInstruction obj)

### enterClassInstruction

public void enterClassInstruction(ClassInstruction obj)

### exitClassInstruction

public void exitClassInstruction(ClassInstruction obj)

### enterConstantInstruction

public void enterConstantInstruction(ConstantInstruction obj)

### exitConstantInstruction

public void exitConstantInstruction(ConstantInstruction obj)

### enterConvertInstruction

public void enterConvertInstruction(ConvertInstruction obj)

### exitConvertInstruction

public void exitConvertInstruction(ConvertInstruction obj)

### enterGetFieldInstruction

public void enterGetFieldInstruction(GetFieldInstruction obj)

### exitGetFieldInstruction

public void exitGetFieldInstruction(GetFieldInstruction obj)

### enterIIncInstruction

public void enterIIncInstruction(IIncInstruction obj)

### exitIIncInstruction

public void exitIIncInstruction(IIncInstruction obj)

### enterJumpInstruction

public void enterJumpInstruction(JumpInstruction obj)

### exitJumpInstruction

public void exitJumpInstruction(JumpInstruction obj)

### enterIfInstruction

public void enterIfInstruction(IfInstruction obj)

### exitIfInstruction

public void exitIfInstruction(IfInstruction obj)

### enterLoadInstruction

public void enterLoadInstruction(LoadInstruction obj)

### exitLoadInstruction

public void exitLoadInstruction(LoadInstruction obj)

### enterLookupSwitchInstruction

public void enterLookupSwitchInstruction(LookupSwitchInstruction obj)

### exitLookupSwitchInstruction

public void exitLookupSwitchInstruction(LookupSwitchInstruction obj)

### enterMathInstruction

public void enterMathInstruction(MathInstruction obj)

### exitMathInstruction

public void exitMathInstruction(MathInstruction obj)

### enterMethodInstruction

public void enterMethodInstruction(MethodInstruction obj)

### exitMethodInstruction

public void exitMethodInstruction(MethodInstruction obj)

### enterMultiANewArrayInstruction

public void enterMultiANewArrayInstruction(MultiANewArrayInstruction obj)

### exitMultiANewArrayInstruction

public void exitMultiANewArrayInstruction(MultiANewArrayInstruction obj)

### enterNewArrayInstruction

public void enterNewArrayInstruction(NewArrayInstruction obj)

### exitNewArrayInstruction

public void exitNewArrayInstruction(NewArrayInstruction obj)

### enterPutFieldInstruction

public void enterPutFieldInstruction(PutFieldInstruction obj)

### exitPutFieldInstruction

public void exitPutFieldInstruction(PutFieldInstruction obj)

### enterRetInstruction

public void enterRetInstruction(RetInstruction obj)

### exitRetInstruction

public void exitRetInstruction(RetInstruction obj)

### enterReturnInstruction

public void enterReturnInstruction(ReturnInstruction obj)

### exitReturnInstruction

public void exitReturnInstruction(ReturnInstruction obj)

### enterStackInstruction

public void enterStackInstruction(StackInstruction obj)

### exitStackInstruction

public void exitStackInstruction(StackInstruction obj)

### enterStoreInstruction

public void enterStoreInstruction(StoreInstruction obj)

### exitStoreInstruction

public void exitStoreInstruction(StoreInstruction obj)

### enterTableSwitchInstruction

public void enterTableSwitchInstruction(TableSwitchInstruction obj)

### exitTableSwitchInstruction

public void exitTableSwitchInstruction(TableSwitchInstruction obj)

### enterWideInstruction

public void enterWideInstruction(WideInstruction obj)

### exitWideInstruction

public void exitWideInstruction(WideInstruction obj)

### enterMonitorEnterInstruction

public void enterMonitorEnterInstruction(MonitorEnterInstruction obj)

### exitMonitorEnterInstruction

public void exitMonitorEnterInstruction(MonitorEnterInstruction obj)

### enterMonitorExitInstruction

public void enterMonitorExitInstruction(MonitorExitInstruction obj)

### exitMonitorExitInstruction

public void exitMonitorExitInstruction(MonitorExitInstruction obj)

### enterCmpInstruction

public void enterCmpInstruction(CmpInstruction obj)

### exitCmpInstruction

public void exitCmpInstruction(CmpInstruction obj)

### enterConstantPool

public void enterConstantPool(ConstantPool obj)

### exitConstantPool

public void exitConstantPool(ConstantPool obj)

### enterEntry

public void enterEntry(Entry obj)

### exitEntry

public void exitEntry(Entry obj)

### enterClassEntry

public void enterClassEntry(ClassEntry obj)

### exitClassEntry

public void exitClassEntry(ClassEntry obj)

### enterDoubleEntry

public void enterDoubleEntry(DoubleEntry obj)

### exitDoubleEntry

public void exitDoubleEntry(DoubleEntry obj)

### enterFieldEntry

public void enterFieldEntry(FieldEntry obj)

### exitFieldEntry

public void exitFieldEntry(FieldEntry obj)

### enterFloatEntry

public void enterFloatEntry(FloatEntry obj)

### exitFloatEntry

public void exitFloatEntry(FloatEntry obj)

### enterIntEntry

public void enterIntEntry(IntEntry obj)

### exitIntEntry

public void exitIntEntry(IntEntry obj)

### enterInterfaceMethodEntry

public void enterInterfaceMethodEntry(InterfaceMethodEntry obj)

### exitInterfaceMethodEntry

public void exitInterfaceMethodEntry(InterfaceMethodEntry obj)

### enterLongEntry

public void enterLongEntry(LongEntry obj)

### exitLongEntry

public void exitLongEntry(LongEntry obj)

### enterMethodEntry

public void enterMethodEntry(MethodEntry obj)

### exitMethodEntry

public void exitMethodEntry(MethodEntry obj)

### enterNameAndTypeEntry

public void enterNameAndTypeEntry(NameAndTypeEntry obj)

### exitNameAndTypeEntry

public void exitNameAndTypeEntry(NameAndTypeEntry obj)

### enterStringEntry

public void enterStringEntry(StringEntry obj)

### exitStringEntry

public void exitStringEntry(StringEntry obj)

### enterUTF8Entry

public void enterUTF8Entry(UTF8Entry obj)

### exitUTF8Entry

public void exitUTF8Entry(UTF8Entry obj)

### enterInvokeDynamicEntry

public void enterInvokeDynamicEntry(InvokeDynamicEntry obj)

### exitInvokeDynamicEntry

public void exitInvokeDynamicEntry(InvokeDynamicEntry obj)

### enterMethodHandleEntry

public void enterMethodHandleEntry(MethodHandleEntry obj)

### exitMethodHandleEntry

public void exitMethodHandleEntry(MethodHandleEntry obj)

### enterMethodTypeEntry

public void enterMethodTypeEntry(MethodTypeEntry obj)

### exitMethodTypeEntry

public void exitMethodTypeEntry(MethodTypeEntry obj)

### enterBootstrapMethod

public void enterBootstrapMethod(BootstrapMethods obj)

### exitBootstrapMethod

public void exitBootstrapMethod(BootstrapMethods obj)