コード例 #1
0
 /** {@inheritDoc} */
 public Content getHeader(String header) {
   String pkgname =
       (annotationType.containingPackage() != null)
           ? annotationType.containingPackage().name()
           : "";
   String clname = annotationType.name();
   Content bodyTree = getBody(true, getWindowTitle(clname));
   addTop(bodyTree);
   addNavLinks(true, bodyTree);
   bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
   HtmlTree div = new HtmlTree(HtmlTag.DIV);
   div.addStyle(HtmlStyle.header);
   if (pkgname.length() > 0) {
     Content pkgNameContent = new StringContent(pkgname);
     Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, pkgNameContent);
     div.addContent(pkgNameDiv);
   }
   LinkInfoImpl linkInfo =
       new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_HEADER, annotationType);
   Content headerContent = new StringContent(header);
   Content heading =
       HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, HtmlStyle.title, headerContent);
   heading.addContent(getTypeParameterLinks(linkInfo));
   div.addContent(heading);
   bodyTree.addContent(div);
   return bodyTree;
 }
コード例 #2
0
 /** Copy the doc files for the current ClassDoc if necessary. */
 private void copyDocFiles() {
   PackageDoc containingPackage = annotationTypeDoc.containingPackage();
   if ((configuration.packages == null
           || Arrays.binarySearch(configuration.packages, containingPackage) < 0)
       && !containingPackagesSeen.contains(containingPackage.name())) {
     // Only copy doc files dir if the containing package is not
     // documented AND if we have not documented a class from the same
     // package already. Otherwise, we are making duplicate copies.
     Util.copyDocFiles(
         configuration,
         Util.getPackageSourcePath(configuration, annotationTypeDoc.containingPackage())
             + DirectoryManager.getDirectoryPath(annotationTypeDoc.containingPackage())
             + File.separator,
         DocletConstants.DOC_FILES_DIR_NAME,
         true);
     containingPackagesSeen.add(containingPackage.name());
   }
 }