private void renderHitGroup(WRITER writer, HitGroup hitGroup) throws IOException {
        if (hitGroup instanceof GroupList) {
            beginGroupList(writer, (GroupList) hitGroup);
            renderHitGroupContent(writer, hitGroup);
            endGroupList(writer, (GroupList) hitGroup);
        } else if (hitGroup instanceof HitList) {
            beginHitList(writer, (HitList) hitGroup);
            renderHitGroupContent(writer, hitGroup);
            endHitList(writer, (HitList) hitGroup);
        } else if (hitGroup instanceof Group) {
            beginGroup(writer, (Group) hitGroup);
            renderHitGroupContent(writer, hitGroup);
            endGroup(writer, (Group) hitGroup);
        } else {
            beginHitGroup(writer, hitGroup);
            renderHitGroupContent(writer, hitGroup);
            endHitGroup(writer, hitGroup);
        }
    }
Picks apart the result and feeds it to the other methods.
container-search/src/main/java/com/yahoo/search/rendering/SectionedRenderer.java