All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joo.libra.sql.ObjectUtils Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package org.joo.libra.sql;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.PropertyUtils;

public class ObjectUtils {

	public static Object getValue(Object obj, String variableName) throws ReflectiveOperationException {
		if (obj == null || variableName == null)
			return null;
		try {
			return PropertyUtils.getNestedProperty(obj, variableName);
		} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
			throw e;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy