Class LastBlocks
java.lang.Object
proguard.classfile.util.inject.location.LastBlocks
- All Implemented Interfaces:
InjectStrategy
An implementation of the InjectStrategy interface to find the potential last blocks of a method.
The last block of a method is defined as the offset of return or throw opcodes within a method.
-
Nested Class Summary
Nested classes/interfaces inherited from interface proguard.classfile.util.inject.location.InjectStrategy
InjectStrategy.InjectLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllSuitableInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod) Find offsets of return or throw instructions to inject a method invocation.getSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod) Find the first offset of return or throw instructions to inject a method invocation.
-
Constructor Details
-
LastBlocks
public LastBlocks()
-
-
Method Details
-
getSingleInjectionLocation
public InjectStrategy.InjectLocation getSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod) Find the first offset of return or throw instructions to inject a method invocation.- Specified by:
getSingleInjectionLocationin interfaceInjectStrategy- Parameters:
targetClass- The class holding the method in which a method invocation will be injected.targetMethod- The target method to have a method invocation injected into.- Returns:
- An InjectLocation instance indicating the first offset suitable for injection.
-
getAllSuitableInjectionLocation
public InjectStrategy.InjectLocation[] getAllSuitableInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod) Find offsets of return or throw instructions to inject a method invocation.- Specified by:
getAllSuitableInjectionLocationin interfaceInjectStrategy- Parameters:
targetClass- The class holding the method in which a method invocation will be injected.targetMethod- The target method to have a method invocation injected into.- Returns:
- An array of one InjectLocation instance indicating the first offset suitable for injection.
-