接口 InjectStrategy
-
- 所有已知实现类:
FirstBlock,LastBlocks,SpecificOffset
public interface InjectStrategyThis interface defines methods for determining code attribute offsets suitable for injecting a method invocation.
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static classInjectStrategy.InjectLocationA data structure indicating a suitable location for injecting a method invocation instruction.
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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. offset) suitable for injecting a method invocation.
-
-
-
方法详细资料
-
getSingleInjectionLocation
InjectStrategy.InjectLocation getSingleInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)
Determine one location (i.e. offset) suitable for injecting a method invocation.- 参数:
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.- 返回:
- An InjectLocation instance indicating an offset suitable for injection and whether the injection shall happen before or after the offset.
-
getAllSuitableInjectionLocation
InjectStrategy.InjectLocation[] getAllSuitableInjectionLocation(ProgramClass targetClass, ProgramMethod targetMethod)
Determine all locations (i.e., offsets) suitable for injecting a method invocation.- 参数:
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.- 返回:
- An array of InjectLocation instances indicating offsets suitable for injection and whether the injection shall take place before or after each offset.
-
-