public CtBehavior[] getDeclaredBehaviors() {
        CtMember.Cache memCache = getMembers();
        CtMember cons = memCache.consHead();
        CtMember consTail = memCache.lastCons();
        int cnum = CtMember.Cache.count(cons, consTail);
        CtMember mth = memCache.methodHead();
        CtMember mthTail = memCache.lastMethod();
        int mnum = CtMember.Cache.count(mth, mthTail);

        CtBehavior[] cb = new CtBehavior[cnum + mnum];
        int i = 0;
        while (cons != consTail) {
            cons = cons.next();
            cb[i++] = (CtBehavior)cons;
        }

        while (mth != mthTail) {
            mth = mth.next();
            cb[i++] = (CtBehavior)mth;
        }

        return cb;
    }