类 AccumulatedCodeInjector


  • public class AccumulatedCodeInjector
    extends CodeInjector
    This utility class allows for injecting multiple static method invocations in multiple target methods. It allows the repeated use of the API methods defined in the CodeInjector class.
    • 构造器详细资料

      • AccumulatedCodeInjector

        public AccumulatedCodeInjector()
    • 方法详细资料

      • injectInvokeStatic

        public CodeInjector injectInvokeStatic​(Clazz clazz,
                                               Method method)
        从类复制的说明: CodeInjector
        Specify the static method to be invoked.
        覆盖:
        injectInvokeStatic 在类中 CodeInjector
        参数:
        clazz - The class containing the static method to be invoked.
        method - The method to be invoked.
      • injectInvokeStatic

        public CodeInjector injectInvokeStatic​(Clazz clazz,
                                               Method method,
                                               InjectedArgument... arguments)
        从类复制的说明: CodeInjector
        Specify the static method to be invoked.
        覆盖:
        injectInvokeStatic 在类中 CodeInjector
        参数:
        clazz - The class containing the static method to be invoked.
        method - The method to be invoked.
        arguments - A list of arguments to be passed to the method to be invoked.
      • into

        public CodeInjector into​(ProgramClass programClass,
                                 ProgramMethod programMethod)
        从类复制的说明: CodeInjector
        Specify the method where a static method invocation will be injected into.
        覆盖:
        into 在类中 CodeInjector
        参数:
        programClass - The program class that has the method where a static method invocation will be injected into.
        programMethod - The method where a static method invocation will be injected into.
      • at

        public CodeInjector at​(InjectStrategy injectStrategy)
        从类复制的说明: CodeInjector
        Specify the location in which the invoke instruction should be injected into.
        覆盖:
        at 在类中 CodeInjector
        参数:
        injectStrategy - The implementation of the InjectStrategy interface which determines the offset to inject the invoke instruction.
      • commit

        public void commit()
        从类复制的说明: CodeInjector
        Apply the invoke instruction in accordance to the specifications provided via the `.injectInvokeStatic(...)`, `.into(...)` and `.at(...)` methods.
        覆盖:
        commit 在类中 CodeInjector