This commit is contained in:
2022-02-05 19:54:00 +08:00
parent d87c77937d
commit 7fcfdb3bd4
3 changed files with 2 additions and 18 deletions

View File

@@ -9,6 +9,8 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }
kotlin { sourceSets.main { kotlin.srcDir("src/api/kotlin") } }
dependencies { dependencies {
// Used 82 API Version // Used 82 API Version
compileOnly 'de.robv.android.xposed:api:82' compileOnly 'de.robv.android.xposed:api:82'

View File

@@ -61,24 +61,6 @@ public class ReflectionUtils {
return sb.toString(); 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 @Deprecated
public static void setStaticObjectField(Class<?> clazz, Class<?> fieldType, String fieldName, Object value) public static void setStaticObjectField(Class<?> clazz, Class<?> fieldType, String fieldName, Object value)
throws NoSuchFieldException, IllegalAccessException { throws NoSuchFieldException, IllegalAccessException {