Refine names
This commit is contained in:
parent
58665b3105
commit
2461a6c767
|
|
@ -43,7 +43,6 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||
import de.robv.android.xposed.callbacks.XC_InitPackageResources;
|
||||
import de.robv.android.xposed.callbacks.XC_LoadPackage;
|
||||
import io.github.libxposed.XposedInterface;
|
||||
import io.github.libxposed.XposedModuleInterface;
|
||||
|
||||
/**
|
||||
* This class contains most of Xposed's central logic, such as initialization and callbacks used by
|
||||
|
|
@ -455,8 +454,8 @@ public final class XposedBridge {
|
|||
var cb = callbacksSnapshot[beforeIdx];
|
||||
if (HookBridge.instanceOf(cb, XC_MethodHook.class)) {
|
||||
((XC_MethodHook) cb).beforeHookedMethod(param);
|
||||
} else if (HookBridge.instanceOf(cb, XposedInterface.BeforeMethodHooker.class)) {
|
||||
((XposedInterface.BeforeMethodHooker<T>) cb).before(param);
|
||||
} else if (HookBridge.instanceOf(cb, XposedInterface.BeforeHooker.class)) {
|
||||
((XposedInterface.BeforeHooker<T>) cb).before(param);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
XposedBridge.log(t);
|
||||
|
|
@ -494,7 +493,7 @@ public final class XposedBridge {
|
|||
if (HookBridge.instanceOf(cb, XC_MethodHook.class)) {
|
||||
((XC_MethodHook) cb).afterHookedMethod(param);
|
||||
} else if (HookBridge.instanceOf(cb, XposedInterface.AfterHookCallback.class)) {
|
||||
((XposedInterface.AfterMethodHooker<T>) cb).after(param);
|
||||
((XposedInterface.AfterHooker<T>) cb).after(param);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
XposedBridge.log(t);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ import de.robv.android.xposed.XposedInit;
|
|||
import io.github.libxposed.XposedContext;
|
||||
import io.github.libxposed.XposedModule;
|
||||
import io.github.libxposed.XposedModuleInterface;
|
||||
import io.github.libxposed.XposedUtils;
|
||||
|
||||
public class LSPosedContext extends XposedContext {
|
||||
|
||||
|
|
@ -795,63 +794,74 @@ public class LSPosedContext extends XposedContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeMethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeHooker<Method> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterMethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterHooker<Method> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, @NonNull MethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, @NonNull Hooker<Method> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeMethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeHooker<Method> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterMethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterHooker<Method> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull MethodHooker<Method> hooker) {
|
||||
@Nullable
|
||||
public MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull Hooker<Method> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeMethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeHooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterMethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterHooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull MethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull Hooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, PRIORITY_DEFAULT, hooker);
|
||||
}
|
||||
|
||||
// TODO
|
||||
@Override
|
||||
public <T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeMethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeHooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterMethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterHooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull MethodHooker<Constructor<T>> hooker) {
|
||||
@Nullable
|
||||
public <T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull Hooker<Constructor<T>> hooker) {
|
||||
return doHook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
|
|
@ -874,12 +884,6 @@ public class LSPosedContext extends XposedContext {
|
|||
return doDeoptimize(constructor);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public XposedUtils getUtils() {
|
||||
return new LSPosedUtils(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void log(@NonNull String message) {
|
||||
Log.i(TAG, mPackageName + ": " + message);
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
package org.lsposed.lspd.impl;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.apache.commons.lang3.ClassUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import de.robv.android.xposed.XposedHelpers;
|
||||
import io.github.libxposed.XposedUtils;
|
||||
|
||||
public class LSPosedUtils implements XposedUtils {
|
||||
private final LSPosedContext context;
|
||||
|
||||
LSPosedUtils(LSPosedContext context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public <T> Class<T> findClass(@NonNull String className, @Nullable ClassLoader classLoader) throws ClassNotFoundException {
|
||||
return (Class<T>) ClassUtils.getClass(classLoader, className.replace('/', '.'), false);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> Class<T> findClassOrNull(@NonNull String className, @Nullable ClassLoader classLoader) {
|
||||
try {
|
||||
return findClass(className, classLoader);
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Field findField(@NonNull Class<?> clazz, @NonNull String fieldName) throws NoSuchFieldException {
|
||||
try {
|
||||
return XposedHelpers.findField(clazz, fieldName);
|
||||
} catch (NoSuchFieldError e) {
|
||||
throw new NoSuchFieldException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field findFieldOrNull(@NonNull Class<?> clazz, @NonNull String fieldName) {
|
||||
try {
|
||||
return findField(clazz, fieldName);
|
||||
} catch (NoSuchFieldException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Field findField(@NonNull String className, @NonNull String fieldName, @Nullable ClassLoader classLoader) throws ClassNotFoundException, NoSuchFieldException {
|
||||
var clazz = findClass(className, classLoader);
|
||||
return findField(clazz, fieldName);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Field findFieldOrNull(@NonNull String className, @NonNull String fieldName, @Nullable ClassLoader classLoader) {
|
||||
try {
|
||||
return findField(className, fieldName, classLoader);
|
||||
} catch (ClassNotFoundException | NoSuchFieldException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,62 +46,62 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
|
|||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeMethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeHooker<Method> hooker) {
|
||||
return getBaseContext().hookBefore(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterMethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterHooker<Method> hooker) {
|
||||
return getBaseContext().hookAfter(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, @NonNull MethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, @NonNull Hooker<Method> hooker) {
|
||||
return getBaseContext().hook(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeMethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeHooker<Method> hooker) {
|
||||
return getBaseContext().hookBefore(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterMethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterHooker<Method> hooker) {
|
||||
return getBaseContext().hookAfter(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull MethodHooker<Method> hooker) {
|
||||
public MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull Hooker<Method> hooker) {
|
||||
return getBaseContext().hook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeMethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeHooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hookBefore(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterMethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterHooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hookAfter(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull MethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull Hooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hook(origin, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeMethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeHooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hookBefore(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterMethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterHooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hookAfter(origin, priority, hooker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull MethodHooker<Constructor<T>> hooker) {
|
||||
public <T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull Hooker<Constructor<T>> hooker) {
|
||||
return getBaseContext().hook(origin, priority, hooker);
|
||||
}
|
||||
|
||||
|
|
@ -115,12 +115,6 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
|
|||
return getBaseContext().deoptimize(constructor);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public XposedUtils getUtils() {
|
||||
return getBaseContext().getUtils();
|
||||
}
|
||||
|
||||
@Override
|
||||
final public void log(@NonNull String message) {
|
||||
getBaseContext().log(message);
|
||||
|
|
|
|||
|
|
@ -71,15 +71,15 @@ public interface XposedInterface {
|
|||
<U> U getExtra(@NonNull String key);
|
||||
}
|
||||
|
||||
interface BeforeMethodHooker<T> {
|
||||
interface BeforeHooker<T> {
|
||||
void before(@NonNull BeforeHookCallback<T> callback);
|
||||
}
|
||||
|
||||
interface AfterMethodHooker<T> {
|
||||
interface AfterHooker<T> {
|
||||
void after(@NonNull AfterHookCallback<T> callback);
|
||||
}
|
||||
|
||||
interface MethodHooker<T> extends BeforeMethodHooker<T>, AfterMethodHooker<T> {
|
||||
interface Hooker<T> extends BeforeHooker<T>, AfterHooker<T> {
|
||||
}
|
||||
|
||||
interface MethodUnhooker<T, U> {
|
||||
|
|
@ -100,37 +100,46 @@ public interface XposedInterface {
|
|||
|
||||
long getFrameworkVersionCode();
|
||||
|
||||
MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeMethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, @NonNull BeforeHooker<Method> hooker);
|
||||
|
||||
MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterMethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, @NonNull AfterHooker<Method> hooker);
|
||||
|
||||
MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, @NonNull MethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, @NonNull Hooker<Method> hooker);
|
||||
|
||||
MethodUnhooker<BeforeMethodHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeMethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<BeforeHooker<Method>, Method> hookBefore(@NonNull Method origin, int priority, @NonNull BeforeHooker<Method> hooker);
|
||||
|
||||
MethodUnhooker<AfterMethodHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterMethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<AfterHooker<Method>, Method> hookAfter(@NonNull Method origin, int priority, @NonNull AfterHooker<Method> hooker);
|
||||
|
||||
MethodUnhooker<MethodHooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull MethodHooker<Method> hooker);
|
||||
@Nullable
|
||||
MethodUnhooker<Hooker<Method>, Method> hook(@NonNull Method origin, int priority, @NonNull Hooker<Method> hooker);
|
||||
|
||||
<T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeMethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, @NonNull BeforeHooker<Constructor<T>> hooker);
|
||||
|
||||
<T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterMethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, @NonNull AfterHooker<Constructor<T>> hooker);
|
||||
|
||||
<T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull MethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, @NonNull Hooker<Constructor<T>> hooker);
|
||||
|
||||
<T> MethodUnhooker<BeforeMethodHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeMethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<BeforeHooker<Constructor<T>>, Constructor<T>> hookBefore(@NonNull Constructor<T> origin, int priority, @NonNull BeforeHooker<Constructor<T>> hooker);
|
||||
|
||||
<T> MethodUnhooker<AfterMethodHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterMethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<AfterHooker<Constructor<T>>, Constructor<T>> hookAfter(@NonNull Constructor<T> origin, int priority, @NonNull AfterHooker<Constructor<T>> hooker);
|
||||
|
||||
<T> MethodUnhooker<MethodHooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull MethodHooker<Constructor<T>> hooker);
|
||||
@Nullable
|
||||
<T> MethodUnhooker<Hooker<Constructor<T>>, Constructor<T>> hook(@NonNull Constructor<T> origin, int priority, @NonNull Hooker<Constructor<T>> hooker);
|
||||
|
||||
boolean deoptimize(@NonNull Method method);
|
||||
|
||||
<T> boolean deoptimize(@NonNull Constructor<T> constructor);
|
||||
|
||||
@Nullable
|
||||
XposedUtils getUtils();
|
||||
|
||||
void log(@NonNull String message);
|
||||
|
||||
void log(@NonNull String message, @NonNull Throwable throwable);
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
package io.github.libxposed;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public interface XposedUtils {
|
||||
@NonNull
|
||||
<T> Class<T> findClass(@NonNull String className, @Nullable ClassLoader classLoader) throws ClassNotFoundException;
|
||||
|
||||
@Nullable
|
||||
<T> Class<T> findClassOrNull(@NonNull String className, @Nullable ClassLoader classLoader);
|
||||
|
||||
@NonNull
|
||||
Field findField(@NonNull Class<?> clazz, @NonNull String fieldName) throws NoSuchFieldException;
|
||||
|
||||
@Nullable
|
||||
Field findFieldOrNull(@NonNull Class<?> clazz, @NonNull String fieldName);
|
||||
|
||||
@NonNull
|
||||
Field findField(@NonNull String className, @NonNull String fieldName, @Nullable ClassLoader classLoader) throws ClassNotFoundException, NoSuchFieldException;
|
||||
|
||||
@Nullable
|
||||
Field findFieldOrNull(@NonNull String className, @NonNull String fieldName, @Nullable ClassLoader classLoader);
|
||||
}
|
||||
Loading…
Reference in New Issue