Class SpecificOffset
- java.lang.Object
-
- proguard.classfile.util.inject.location.SpecificOffset
-
- All Implemented Interfaces:
InjectStrategy
public class SpecificOffset extends java.lang.Object implements InjectStrategy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface proguard.classfile.util.inject.location.InjectStrategy
InjectStrategy.InjectLocation
-
-
Constructor Summary
Constructors Constructor Description SpecificOffset(int targetOffset, boolean shouldInjectBefore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InjectStrategy.InjectLocation[]getAllSuitableInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)Determine all locations (i.e., offsets) suitable for injecting a method invocation.InjectStrategy.InjectLocationgetSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)Determine one location (i.e.
-
-
-
Method Detail
-
getSingleInjectionLocation
public InjectStrategy.InjectLocation getSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)
Description copied from interface:InjectStrategyDetermine one location (i.e. offset) suitable for injecting 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 an offset suitable for injection and whether the injection shall happen before or after the offset.
-
getAllSuitableInjectionLocation
public InjectStrategy.InjectLocation[] getAllSuitableInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)
Description copied from interface:InjectStrategyDetermine all locations (i.e., offsets) suitable for injecting 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 InjectLocation instances indicating offsets suitable for injection and whether the injection shall take place before or after each offset.
-
-