protected void addPackageAnnotationList ( Content contentTree ) { if ( ! utils . isAnnotationType ( typeElement ) || pkgToPackageAnnotations == null || pkgToPackageAnnotations . isEmpty ( ) ) { return ; } Content caption = getTableCaption ( configuration . getContent ( "doclet.ClassUse_PackageAnnotation" , getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_USE_HEADER , typeElement ) ) ) ) ; 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 ) ; boolean altColor = true ; for ( PackageElement pkg : pkgToPackageAnnotations ) { HtmlTree tr = new HtmlTree ( HtmlTag . TR ) ; tr . addStyle ( altColor ? HtmlStyle . altColor : HtmlStyle . rowColor ) ; altColor = ! altColor ; Content thFirst = HtmlTree . TH_ROW_SCOPE ( HtmlStyle . colFirst , getPackageLink ( pkg ) ) ; tr . addContent ( thFirst ) ; 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 elements .