mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
...
This commit is contained in:
@@ -9,6 +9,8 @@ java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlin { sourceSets.main { kotlin.srcDir("src/api/kotlin") } }
|
||||
|
||||
dependencies {
|
||||
// Used 82 API Version
|
||||
compileOnly 'de.robv.android.xposed:api:82'
|
||||
|
@@ -61,24 +61,6 @@ public class ReflectionUtils {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static <T> T getStaticObjectIfExists(Class<?> clazz, Class<?> fieldType, String fieldName) {
|
||||
return getObjectIfExists(clazz, fieldType, fieldName, null);
|
||||
}
|
||||
|
||||
public static <T> T getObjectIfExists(Class<?> clazz, Class<?> fieldType, String fieldName, Object obj) {
|
||||
return getObjectIfExists(clazz, fieldType.getName(), fieldName, obj);
|
||||
}
|
||||
|
||||
public static <T> T getObjectIfExists(Class<?> clazz, String typeName, String fieldName, Object obj) {
|
||||
try {
|
||||
Field field = findFieldIfExists(clazz, typeName, fieldName);
|
||||
return field == null ? null : (T) field.get(obj);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setStaticObjectField(Class<?> clazz, Class<?> fieldType, String fieldName, Object value)
|
||||
throws NoSuchFieldException, IllegalAccessException {
|
||||
|
Reference in New Issue
Block a user