private CtField getDeclaredField2(String name) {
        CtMember.Cache memCache = getMembers();
        CtMember field = memCache.fieldHead();
        CtMember tail = memCache.lastField();
        while (field != tail) {
            field = field.next();
            if (field.getName().equals(name))
                return (CtField)field;
        }

        return null;
    }