/** * 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() ); } }
/** * 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, containingPackage); containingPackagesSeen.add(containingPackage.name()); } }
/** * @param annotationType the annotation type being documented. * @param prevType the previous class that was documented. * @param nextType the next class being documented. */ public AnnotationTypeWriterImpl( AnnotationTypeDoc annotationType, Type prevType, Type nextType ) throws Exception { super( ConfigurationImpl.getInstance(), DirectoryManager.getDirectoryPath( annotationType.containingPackage() ), annotationType.name() + ".html", DirectoryManager.getRelativePath( annotationType.containingPackage().name() ) ); this.annotationType = annotationType; configuration.currentcd = annotationType.asClassDoc(); this.prev = prevType; this.next = nextType; }
/** * {@inheritDoc} */ public void writeHeader( String header ) { String pkgname = (annotationType.containingPackage() != null) ? annotationType.containingPackage().name() : ""; String clname = annotationType.name(); printHtmlHeader( clname, configuration.metakeywords.getMetaKeywords( annotationType ), true ); printTop(); navLinks( true ); println( "<!-- ======== START OF CLASS DATA ======== -->" ); if( pkgname.length() > 0 ) { font( "-1" ); print( pkgname ); fontEnd(); br(); } print( header + getTypeParameterLinks( new LinkInfoImpl( LinkInfoImpl.CONTEXT_CLASS_HEADER, annotationType, false ) ) ); h2End(); }
/** * {@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; }