Package serp.bytecode.visitor
Class BCVisitor
- java.lang.Object
-
- serp.bytecode.visitor.BCVisitor
-
- Direct Known Subclasses:
PrettyPrintVisitor
public class BCVisitor extends java.lang.Object
Base class for visitors on a bytecode entity. The publicvisit(serp.bytecode.visitor.VisitAcceptor)
method will traverse the object graph of the given entity, calling theenter*
andexit*
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.
-
-
Constructor Summary
Constructors Constructor Description BCVisitor()
-
Method Summary
-
-
-
Method Detail
-
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)
-
-