public static Field getField(Class cls, String fieldName)
    {
        Assert.notNull(cls, "cls cannot be null");
        Assert.notNull(fieldName, "fieldName cannot be null");
        
        // First check for public field using getField()
        Field field = null;
        try
        {
            field = cls.getField(fieldName);
        }
        catch(NoSuchFieldException ignore) {}
        
        // If that fails, use getDeclaredField() going up the class hierarchy
        Class sup = cls;
        while(null == field && sup != null)
        {
            try
            {
                field = sup.getDeclaredField(fieldName);
            }
            catch(NoSuchFieldException ignore) {}
            sup = sup.getSuperclass();
        }
        
        // Last resort: throw IllegalArgumentException
        if(field == null)
        {
            throw new IllegalArgumentException(
                "Cannot find \"" + fieldName + "\" method on : " + cls
            );
        }
        return field;
    }