Fix compatibility
This commit is contained in:
parent
b83c0f4169
commit
c389162c7a
|
|
@ -115,7 +115,7 @@ public abstract class XC_MethodHook extends XCallback {
|
||||||
/**
|
/**
|
||||||
* The hooked method/constructor.
|
* The hooked method/constructor.
|
||||||
*/
|
*/
|
||||||
public T method;
|
public Member method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@code this} reference for an instance method, or {@code null} for static methods.
|
* The {@code this} reference for an instance method, or {@code null} for static methods.
|
||||||
|
|
@ -193,7 +193,7 @@ public abstract class XC_MethodHook extends XCallback {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public T getOrigin() {
|
public T getOrigin() {
|
||||||
return method;
|
return (T) method;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
@ -232,13 +232,13 @@ public abstract class XC_MethodHook extends XCallback {
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Object invokeOrigin(@Nullable Object thisObject, Object[] args) throws InvocationTargetException, IllegalAccessException {
|
public Object invokeOrigin(@Nullable Object thisObject, Object[] args) throws InvocationTargetException, IllegalAccessException {
|
||||||
return HookBridge.invokeOriginalMethod(method, thisObject, args);
|
return HookBridge.invokeOriginalMethod((Executable) method, thisObject, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Object invokeOrigin() throws InvocationTargetException, IllegalAccessException {
|
public Object invokeOrigin() throws InvocationTargetException, IllegalAccessException {
|
||||||
return HookBridge.invokeOriginalMethod(method, thisObject, args);
|
return HookBridge.invokeOriginalMethod((Executable) method, thisObject, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue