ec.gob.senescyt.sniese.commons.tests.helpers.InicializadorPropiedades Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sniese-commons-test Show documentation
Show all versions of sniese-commons-test Show documentation
Librería que contiene clases de uso comun para microservicios hechos en dropwizard
package ec.gob.senescyt.sniese.commons.tests.helpers;
import java.lang.reflect.Field;
public final class InicializadorPropiedades {
private InicializadorPropiedades() {}
public static void asignar(Object obj, String fieldName, Object value) throws NoSuchFieldException, IllegalAccessException {
Field field = obj.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
field.set(obj, value);
}
}