类 FirstBlock

  • 所有已实现的接口:
    InjectStrategy

    public class FirstBlock
    extends java.lang.Object
    implements InjectStrategy
    An implementation of the InjectStrategy interface to find the earliest location suitable for injecting method invocation instructions.
    • 构造器详细资料

      • FirstBlock

        public FirstBlock()
    • 方法详细资料

      • getSingleInjectionLocation

        public InjectStrategy.InjectLocation getSingleInjectionLocation​(ProgramClass targetClass,
                                                                        ProgramMethod targetMethod)
        Find the first offset to inject a method invocation. If the target method is a constructor, the offset is right after the `invokespecial` to the constructor of the current class or its super class.
        指定者:
        getSingleInjectionLocation 在接口中 InjectStrategy
        参数:
        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 the first offset suitable for injection.
      • getAllSuitableInjectionLocation

        public InjectStrategy.InjectLocation[] getAllSuitableInjectionLocation​(ProgramClass targetClass,
                                                                               ProgramMethod targetMethod)
        Find the first offset to inject a method invocation. If the target method is a constructor, the offset is right after the `invokespecial` to the constructor of the current class or its super class.
        指定者:
        getAllSuitableInjectionLocation 在接口中 InjectStrategy
        参数:
        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 one InjectLocation instance indicating the first offset suitable for injection.