package jp.sf.amateras.mirage.util;

import java.lang.reflect.Field;

public class ReflectionUtil {

	public static Field getField(Class<?> clazz, String name){
		while(clazz != Object.class){
			try {
				Field field = clazz.getDeclaredField(name);
				if(field != null){
					return field;
				}
			} catch(Exception ex){
				;
			}
			clazz = clazz.getSuperclass();
		}
		return null;
	}

}
