![JAR search and dependency download from the Maven repository](/logo.png)
com.github.hippoom.tdb.reflection.PrivateFieldSetter Maven / Gradle / Ivy
package com.github.hippoom.tdb.reflection;
import java.lang.reflect.Field;
import lombok.SneakyThrows;
public class PrivateFieldSetter {
@SneakyThrows
public static void set(Object target, String fieldName, Object value) {
Field field = target.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
field.set(target, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy