void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) {
        ClassDocImpl result = classMap.get(clazz);
        if (result != null) {
            if (docComment != null) result.setRawCommentText(docComment);
            if (tree != null) result.setTree(tree);
            return;
        }
        if (isAnnotationType(tree)) {   // flags of clazz may not yet be set
            result = new AnnotationTypeDocImpl(this, clazz, docComment, tree, lineMap);
        } else {
            result = new ClassDocImpl(this, clazz, docComment, tree, lineMap);
        }
        classMap.put(clazz, result);
    }