From b6926a5fbaaeb72ad042a3647fd79665f2f45bd4 Mon Sep 17 00:00:00 2001
From: Nullptr
Date: Sat, 22 Jul 2023 12:50:58 +0800
Subject: [PATCH] More docs
---
.../github/libxposed/api/XposedInterface.java | 58 ++++++++++---------
1 file changed, 31 insertions(+), 27 deletions(-)
diff --git a/api/src/main/java/io/github/libxposed/api/XposedInterface.java b/api/src/main/java/io/github/libxposed/api/XposedInterface.java
index 67d2aa6..bdc4dfd 100644
--- a/api/src/main/java/io/github/libxposed/api/XposedInterface.java
+++ b/api/src/main/java/io/github/libxposed/api/XposedInterface.java
@@ -79,9 +79,9 @@ public interface XposedInterface {
* The before invocation method should have the following signature:
* params: {@code member} - The {@link Member} object representing the method or constructor being hooked
*
- * {@code thisObject} - The {@code this} pointer, or null if the method is static
+ * {@code thisObject} - The {@code this} pointer, or null if the method is static
*
- * {@code args} - The arguments used for the method call
+ * {@code args} - The arguments used for the method call
* returns: An {@link Hooker} object, used to save contextual information for current invocation routine
*
*
@@ -89,7 +89,7 @@ public interface XposedInterface {
* The after invocation method should have the following signature:
* params: {@code extras} - The {@link Hooker} object returned by the before invocation method
*
- * {@code result} - The result of the invocation
+ * {@code result} - The result of the invocation
*
*
* Example usage:
@@ -164,52 +164,56 @@ public interface XposedInterface {
int getFrameworkPrivilege();
/**
- * Hook method unhooker.
+ * Hook a method with default priority.
*
- * @param origin the origin
- * @param hooker the hooker
- * @return the method unhooker
- * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke}
+ * @param origin The method to be hooked
+ * @param hooker The hooker class
+ * @return Unhooker for canceling the hook
+ * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke},
+ * or hooker is invalid
* @throws HookFailedError if hook fails due to framework internal error
*/
@NonNull
MethodUnhooker hook(@NonNull Method origin, @NonNull Class extends Hooker> hooker);
/**
- * Hook method unhooker.
+ * Hook a method with specified priority.
*
- * @param origin the origin
- * @param priority the priority
- * @param hooker the hooker
- * @return the method unhooker
- * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke}
+ * @param origin The method to be hooked
+ * @param priority The hook priority
+ * @param hooker The hooker class
+ * @return Unhooker for canceling the hook
+ * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke},
+ * or hooker is invalid
* @throws HookFailedError if hook fails due to framework internal error
*/
@NonNull
MethodUnhooker hook(@NonNull Method origin, int priority, @NonNull Class extends Hooker> hooker);
/**
- * Hook method unhooker.
+ * Hook a constructor with default priority.
*
- * @param the type parameter
- * @param origin the origin
- * @param hooker the hooker
- * @return the method unhooker
- * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke}
+ * @param The type of the constructor
+ * @param origin The constructor to be hooked
+ * @param hooker The hooker class
+ * @return Unhooker for canceling the hook
+ * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke},
+ * or hooker is invalid
* @throws HookFailedError if hook fails due to framework internal error
*/
@NonNull
MethodUnhooker> hook(@NonNull Constructor origin, @NonNull Class extends Hooker> hooker);
/**
- * Hook method unhooker.
+ * Hook a constructor with specified priority.
*
- * @param the type parameter
- * @param origin the origin
- * @param priority the priority
- * @param hooker the hooker
- * @return the method unhooker
- * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke}
+ * @param The type of the constructor
+ * @param origin The constructor to be hooked
+ * @param priority The hook priority
+ * @param hooker The hooker class
+ * @return Unhooker for canceling the hook
+ * @throws IllegalArgumentException if origin is abstract, framework internal or {@link Method#invoke},
+ * or hooker is invalid
* @throws HookFailedError if hook fails due to framework internal error
*/
@NonNull