protected void addPackageAnnotationList ( Content contentTree ) throws IOException { if ( ( ! classdoc . isAnnotationType ( ) ) || pkgToPackageAnnotations == null || pkgToPackageAnnotations . isEmpty ( ) ) { return ; } Content caption = getTableCaption ( configuration . getResource ( "doclet.ClassUse_PackageAnnotation" , getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_USE_HEADER , classdoc ) ) ) ) ; Content table = ( configuration . isOutputHtml5 ( ) ) ? HtmlTree . TABLE ( HtmlStyle . useSummary , caption ) : HtmlTree . TABLE ( HtmlStyle . useSummary , useTableSummary , caption ) ; table . addContent ( getSummaryTableHeader ( packageTableHeader , "col" ) ) ; Content tbody = new HtmlTree ( HtmlTag . TBODY ) ; Iterator < PackageDoc > it = pkgToPackageAnnotations . iterator ( ) ; for ( int i = 0 ; it . hasNext ( ) ; i ++ ) { PackageDoc pkg = it . next ( ) ; HtmlTree tr = new HtmlTree ( HtmlTag . TR ) ; if ( i % 2 == 0 ) { tr . addStyle ( HtmlStyle . altColor ) ; } else { tr . addStyle ( HtmlStyle . rowColor ) ; } Content tdFirst = HtmlTree . TD ( HtmlStyle . colFirst , getPackageLink ( pkg , new StringContent ( pkg . name ( ) ) ) ) ; tr . addContent ( tdFirst ) ; HtmlTree tdLast = new HtmlTree ( HtmlTag . TD ) ; tdLast . addStyle ( HtmlStyle . colLast ) ; addSummaryComment ( pkg , tdLast ) ; tr . addContent ( tdLast ) ; tbody . addContent ( tr ) ; } table . addContent ( tbody ) ; Content li = HtmlTree . LI ( HtmlStyle . blockList , table ) ; contentTree . addContent ( li ) ; }
Add the package annotation list .