接口 XposedInterface.Chain

封闭接口:
XposedInterface

public static interface XposedInterface.Chain
Interceptor chain for a method or constructor. Chain objects cannot be shared among threads or reused after XposedInterface.Hooker.intercept(Chain) ends.
  • 方法概要

    修饰符和类型
    方法
    说明
    getArg(int index)
    Gets the argument at the given index.
    Gets the arguments.
    Gets the method / constructor being hooked.
    Gets the this pointer for the call, or null for static methods.
    Proceeds to the next interceptor in the chain with the same arguments and this pointer.
    proceed(Object[] args)
    Proceeds to the next interceptor in the chain with the given arguments and the same this pointer.
    proceedWith(Object thisObject)
    Proceeds to the next interceptor in the chain with the same arguments and given this pointer.
    proceedWith(Object thisObject, Object[] args)
    Proceeds to the next interceptor in the chain with the given arguments and this pointer.
  • 方法详细资料

    • getExecutable

      @NonNull Executable getExecutable()
      Gets the method / constructor being hooked.
    • getThisObject

      Object getThisObject()
      Gets the this pointer for the call, or null for static methods.
    • getArgs

      @NonNull List<Object> getArgs()
      Gets the arguments. The returned list is immutable. If you want to change the arguments, you should call proceed(Object...) or proceedWith(Object, Object...) with the new arguments.
    • getArg

      Gets the argument at the given index.
      参数:
      index - The argument index
      返回:
      The argument at the given index
      抛出:
      IndexOutOfBoundsException - if index is out of bounds
      ClassCastException - if the argument cannot be cast to the expected type
    • proceed

      Object proceed() throws Throwable
      Proceeds to the next interceptor in the chain with the same arguments and this pointer.
      返回:
      The result returned from next interceptor or the original executable if current interceptor is the last one in the chain.

      For void methods and constructors, always returns null.

      抛出:
      Throwable - if any interceptor or the original executable throws an exception
    • proceed

      Object proceed(@NonNull Object[] args) throws Throwable
      Proceeds to the next interceptor in the chain with the given arguments and the same this pointer.
      参数:
      args - The arguments used for the call
      返回:
      The result returned from next interceptor or the original executable if current interceptor is the last one in the chain.

      For void methods and constructors, always returns null.

      抛出:
      Throwable - if any interceptor or the original executable throws an exception
    • proceedWith

      Object proceedWith(@NonNull Object thisObject) throws Throwable
      Proceeds to the next interceptor in the chain with the same arguments and given this pointer. Static method interceptors should not call this.
      参数:
      thisObject - The this pointer for the call
      返回:
      The result returned from next interceptor or the original executable if current interceptor is the last one in the chain.

      For void methods and constructors, always returns null.

      抛出:
      Throwable - if any interceptor or the original executable throws an exception
    • proceedWith

      Object proceedWith(@NonNull Object thisObject, @NonNull Object[] args) throws Throwable
      Proceeds to the next interceptor in the chain with the given arguments and this pointer. Static method interceptors should not call this.
      参数:
      thisObject - The this pointer for the call
      args - The arguments used for the call
      返回:
      The result returned from next interceptor or the original executable if current interceptor is the last one in the chain.

      For void methods and constructors, always returns null.

      抛出:
      Throwable - if any interceptor or the original executable throws an exception