package ncrashed.warp;

import java.lang.reflect.Field;


class ReflectionManager {

	public static Object getValue(Object obj, String field)
	{
		try {
			
			Field f = obj.getClass().getDeclaredField(field);
			
			f.setAccessible(true);
			
			return f.get(obj);
			
		} catch (NoSuchFieldException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return null;
	}
	
}
