类 BranchTargetFinder
java.lang.Object
proguard.classfile.util.BranchTargetFinder
public class BranchTargetFinder
extends Object
implements AttributeVisitor, InstructionVisitor, ExceptionInfoVisitor, ConstantVisitor
This
AttributeVisitor finds all instruction offsets, branch targets, and exception
targets in the CodeAttribute instances that it visits.-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanReturns whether the method contains subroutines, in the CodeAttribute that was visited most recently.booleanisAfterBranch(int offset) Returns whether the instruction at the given offset comes right after a definite branch instruction in the CodeAttribute that was visited most recently.booleanisBranchFallThrough(int offset) Return whether the instruction at the given offset is a conditional branch fall-through.booleanisBranchOrigin(int offset) Returns whether the instruction at the given offset is the origin of a branch instruction in the CodeAttribute that was visited most recently.booleanisBranchTarget(int offset) Returns whether the instruction at the given offset is the target of a branch instruction in the CodeAttribute that was visited most recently.booleanisCreation(int offset) Returns whether the instruction at the given offset creates a new, uninitialized object instance, in the CodeAttribute that was visited most recently.booleanisExceptionEnd(int offset) Returns whether the instruction at the given offset is the end of an exception try block in the CodeAttribute that was visited most recently.booleanisExceptionHandler(int offset) Returns whether the instruction at the given offset is the start of an exception handler in the CodeAttribute that was visited most recently.booleanisExceptionStart(int offset) Returns whether the instruction at the given offset is the start of an exception try block in the CodeAttribute that was visited most recently.booleanisInitializer(int offset) Returns whether the instruction at the given offset is the special invocation of an instance initializer, in the CodeAttribute that was visited most recently.booleanisInstruction(int offset) Returns whether there is an instruction at the given offset in the CodeAttribute that was visited most recently.booleanisLeader(int offset) Return whether the instruction at the given offset is a leader.booleanisSubroutine(int offset) Returns whether the instruction at the given offset is part of a subroutine in the CodeAttribute that was visited most recently.booleanisSubroutineInvocation(int offset) Returns whether the instruction at the given offset is a subroutine invocation in the CodeAttribute that was visited most recently.booleanisSubroutineReturning(int offset) Returns whether the subroutine at the given offset is ever returning by means of a regular 'ret' instruction.booleanisSubroutineStart(int offset) Returns whether the instruction at the given offset is the start of a subroutine in the CodeAttribute that was visited most recently.booleanisTarget(int offset) Returns whether the instruction at the given offset is the target of any kind in the CodeAttribute that was visited most recently.intsubroutineEnd(int offset) Returns the offset after the subroutine at the given offset, in the CodeAttribute that was visited most recently.intsubroutineStart(int offset) Returns the start offset of the subroutine at the given offset, in the CodeAttribute that was visited most recently.voidvisitAnyAttribute(Clazz clazz, Attribute attribute) Visits any Attribute instance.voidvisitAnyConstant(Clazz clazz, Constant constant) Visits any Constant instance.voidvisitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) Visits any SwitchInstruction instance.voidvisitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) voidvisitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) voidvisitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) voidvisitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) voidvisitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant) voidvisitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction) voidvisitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 proguard.classfile.attribute.visitor.AttributeVisitor
visitAnnotationDefaultAttribute, visitAnyAnnotationsAttribute, visitAnyParameterAnnotationsAttribute, visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitEnclosingMethodAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, visitLineNumberTableAttribute, visitLocalVariableTableAttribute, visitLocalVariableTypeTableAttribute, visitMethodParametersAttribute, visitModuleAttribute, visitModuleMainClassAttribute, visitModulePackagesAttribute, visitNestHostAttribute, visitNestMembersAttribute, visitPermittedSubclassesAttribute, visitRecordAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSourceDebugExtensionAttribute, visitSourceDirAttribute, visitSourceFileAttribute, visitStackMapAttribute, visitStackMapTableAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute从接口继承的方法 proguard.classfile.constant.visitor.ConstantVisitor
visitAnyMethodrefConstant, visitAnyRefConstant, visitClassConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant从接口继承的方法 proguard.classfile.instruction.visitor.InstructionVisitor
visitAnyInstruction, visitLookUpSwitchInstruction, visitTableSwitchInstruction
-
字段详细资料
-
构造器详细资料
-
BranchTargetFinder
public BranchTargetFinder()
-
-
方法详细资料
-
isInstruction
public boolean isInstruction(int offset) Returns whether there is an instruction at the given offset in the CodeAttribute that was visited most recently. -
isCreation
public boolean isCreation(int offset) Returns whether the instruction at the given offset creates a new, uninitialized object instance, in the CodeAttribute that was visited most recently. -
isInitializer
public boolean isInitializer(int offset) Returns whether the instruction at the given offset is the special invocation of an instance initializer, in the CodeAttribute that was visited most recently. -
isTarget
public boolean isTarget(int offset) Returns whether the instruction at the given offset is the target of any kind in the CodeAttribute that was visited most recently. -
isBranchOrigin
public boolean isBranchOrigin(int offset) Returns whether the instruction at the given offset is the origin of a branch instruction in the CodeAttribute that was visited most recently. -
isBranchTarget
public boolean isBranchTarget(int offset) Returns whether the instruction at the given offset is the target of a branch instruction in the CodeAttribute that was visited most recently. -
isAfterBranch
public boolean isAfterBranch(int offset) Returns whether the instruction at the given offset comes right after a definite branch instruction in the CodeAttribute that was visited most recently. -
isExceptionStart
public boolean isExceptionStart(int offset) Returns whether the instruction at the given offset is the start of an exception try block in the CodeAttribute that was visited most recently. -
isExceptionEnd
public boolean isExceptionEnd(int offset) Returns whether the instruction at the given offset is the end of an exception try block in the CodeAttribute that was visited most recently. -
isExceptionHandler
public boolean isExceptionHandler(int offset) Returns whether the instruction at the given offset is the start of an exception handler in the CodeAttribute that was visited most recently. -
isSubroutineInvocation
public boolean isSubroutineInvocation(int offset) Returns whether the instruction at the given offset is a subroutine invocation in the CodeAttribute that was visited most recently. -
isSubroutineStart
public boolean isSubroutineStart(int offset) Returns whether the instruction at the given offset is the start of a subroutine in the CodeAttribute that was visited most recently. -
isSubroutine
public boolean isSubroutine(int offset) Returns whether the instruction at the given offset is part of a subroutine in the CodeAttribute that was visited most recently. -
isSubroutineReturning
public boolean isSubroutineReturning(int offset) Returns whether the subroutine at the given offset is ever returning by means of a regular 'ret' instruction. -
subroutineStart
public int subroutineStart(int offset) Returns the start offset of the subroutine at the given offset, in the CodeAttribute that was visited most recently. -
subroutineEnd
public int subroutineEnd(int offset) Returns the offset after the subroutine at the given offset, in the CodeAttribute that was visited most recently. -
containsSubroutines
public boolean containsSubroutines()Returns whether the method contains subroutines, in the CodeAttribute that was visited most recently. -
isBranchFallThrough
public boolean isBranchFallThrough(int offset) Return whether the instruction at the given offset is a conditional branch fall-through. -
isLeader
public boolean isLeader(int offset) Return whether the instruction at the given offset is a leader. -
visitAnyAttribute
从接口复制的说明:AttributeVisitorVisits any Attribute instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyAttribute在接口中AttributeVisitor
-
visitCodeAttribute
- 指定者:
visitCodeAttribute在接口中AttributeVisitor
-
visitSimpleInstruction
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction) - 指定者:
visitSimpleInstruction在接口中InstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) - 指定者:
visitConstantInstruction在接口中InstructionVisitor
-
visitVariableInstruction
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) - 指定者:
visitVariableInstruction在接口中InstructionVisitor
-
visitBranchInstruction
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) - 指定者:
visitBranchInstruction在接口中InstructionVisitor
-
visitAnySwitchInstruction
public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) 从接口复制的说明:InstructionVisitorVisits any SwitchInstruction instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnySwitchInstruction在接口中InstructionVisitor
-
visitAnyConstant
从接口复制的说明:ConstantVisitorVisits any Constant instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyConstant在接口中ConstantVisitor
-
visitMethodrefConstant
- 指定者:
visitMethodrefConstant在接口中ConstantVisitor
-
visitExceptionInfo
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) - 指定者:
visitExceptionInfo在接口中ExceptionInfoVisitor
-