Class SpecificOffset
java.lang.Object
proguard.classfile.util.inject.location.SpecificOffset
- All Implemented Interfaces:
InjectStrategy
-
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) Determine all locations (i.e., offsets) suitable for injecting a method invocation.getSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod) Determine one location (i.e.
-
Constructor Details
-
SpecificOffset
public SpecificOffset(int targetOffset, boolean shouldInjectBefore)
-
-
Method Details
-
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.
-