Add newInstanceSpecial

This commit is contained in:
LoveSy 2023-01-24 20:56:33 +08:00
parent 9dbc7cb801
commit 04ba11db12
No known key found for this signature in database
2 changed files with 13 additions and 3 deletions

View File

@ -226,12 +226,18 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
return getBaseContext().invokeSpecial(method, thisObject, args);
}
@Nullable
@NonNull
@Override
public <T> T newInstanceOrigin(@NonNull Constructor<T> constructor, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException {
return getBaseContext().newInstanceOrigin(constructor, args);
}
@NonNull
@Override
public <T, U extends T> U newInstanceSpecial(@NonNull Constructor<T> constructor, @NonNull Class<U> subClass, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException {
return getBaseContext().newInstanceSpecial(constructor, subClass, args);
}
/**
* {@inheritDoc}
*/

View File

@ -131,7 +131,7 @@ public interface XposedInterface {
* @throws IllegalAccessException the illegal access exception
*/
@Nullable
Object invokeOrigin() throws InvocationTargetException, IllegalAccessException;
Object invokeOrigin() throws InvocationTargetException, IllegalArgumentException, IllegalAccessException;
/**
* Sets extra.
@ -539,9 +539,13 @@ public interface XposedInterface {
* @throws InvocationTargetException the invocation target exception
* @throws IllegalAccessException the illegal access exception
*/
@Nullable
@NonNull
<T> T newInstanceOrigin(@NonNull Constructor<T> constructor, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException;
@NonNull
<T, U extends T> U newInstanceSpecial(@NonNull Constructor<T> constructor, @NonNull Class<U> subClass, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException;
/**
* Log.
*