public void addClassSignature(String modifiers, Content classInfoTree) {
        boolean isInterface = classDoc.isInterface();
        classInfoTree.addContent(new HtmlTree(HtmlTag.BR));
        Content pre = new HtmlTree(HtmlTag.PRE);
        addAnnotationInfo(classDoc, pre);
        pre.addContent(modifiers);
        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
                LinkInfoImpl.Kind.CLASS_SIGNATURE, classDoc);
        //Let's not link to ourselves in the signature.
        linkInfo.linkToSelf = false;
        Content className = new StringContent(classDoc.name());
        Content parameterLinks = getTypeParameterLinks(linkInfo);
        if (configuration.linksource) {
            addSrcLink(classDoc, className, pre);
            pre.addContent(parameterLinks);
        } else {
            Content span = HtmlTree.SPAN(HtmlStyle.typeNameLabel, className);
            span.addContent(parameterLinks);
            pre.addContent(span);
        }
        if (!isInterface) {
            Type superclass = Util.getFirstVisibleSuperClass(classDoc,
                    configuration);
            if (superclass != null) {
                pre.addContent(DocletConstants.NL);
                pre.addContent("extends ");
                Content link = getLink(new LinkInfoImpl(configuration,
                        LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
                        superclass));
                pre.addContent(link);
            }
        }
        Type[] implIntfacs = classDoc.interfaceTypes();
        if (implIntfacs != null && implIntfacs.length > 0) {
            int counter = 0;
            for (int i = 0; i < implIntfacs.length; i++) {
                ClassDoc classDoc = implIntfacs[i].asClassDoc();
                if (! (classDoc.isPublic() ||
                        Util.isLinkable(classDoc, configuration))) {
                    continue;
                }
                if (counter == 0) {
                    pre.addContent(DocletConstants.NL);
                    pre.addContent(isInterface? "extends " : "implements ");
                } else {
                    pre.addContent(", ");
                }
                Content link = getLink(new LinkInfoImpl(configuration,
                        LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
                        implIntfacs[i]));
                pre.addContent(link);
                counter++;
            }
        }
        classInfoTree.addContent(pre);
    }
public void addClassSignature ( String modifiers , Content classInfoTree ) { boolean isInterface = classDoc . isInterface ( ) ; classInfoTree . addContent ( new HtmlTree ( HtmlTag . BR ) ) ; Content pre = new HtmlTree ( HtmlTag . PRE ) ; addAnnotationInfo ( classDoc , pre ) ; pre . addContent ( modifiers ) ; LinkInfoImpl linkInfo = new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_SIGNATURE , classDoc ) ; linkInfo . linkToSelf = false ; Content className = new StringContent ( classDoc . name ( ) ) ; Content parameterLinks = getTypeParameterLinks ( linkInfo ) ; if ( configuration . linksource ) { addSrcLink ( classDoc , className , pre ) ; pre . addContent ( parameterLinks ) ; } else { Content span = HtmlTree . SPAN ( HtmlStyle . typeNameLabel , className ) ; span . addContent ( parameterLinks ) ; pre . addContent ( span ) ; } if ( ! isInterface ) { Type superclass = Util . getFirstVisibleSuperClass ( classDoc , configuration ) ; if ( superclass != null ) { pre . addContent ( DocletConstants . NL ) ; pre . addContent ( "extends " ) ; Content link = getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_SIGNATURE_PARENT_NAME , superclass ) ) ; pre . addContent ( link ) ; } } Type [ ] implIntfacs = classDoc . interfaceTypes ( ) ; if ( implIntfacs != null && implIntfacs . length > 0 ) { int counter = 0 ; for ( int i = 0 ; i < implIntfacs . length ; i ++ ) { ClassDoc classDoc = implIntfacs [ i ] . asClassDoc ( ) ; if ( ! ( classDoc . isPublic ( ) || Util . isLinkable ( classDoc , configuration ) ) ) { continue ; } if ( counter == 0 ) { pre . addContent ( DocletConstants . NL ) ; pre . addContent ( isInterface ? "extends " : "implements " ) ; } else { pre . addContent ( ", " ) ; } Content link = getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_SIGNATURE_PARENT_NAME , implIntfacs [ i ] ) ) ; pre . addContent ( link ) ; counter ++ ; } } classInfoTree . addContent ( pre ) ; }
{@inheritDoc}