public boolean matches(String name) { for (ClassDoc cd : packageDoc.allClasses()) if (cd.qualifiedName().equals(name)) return true; return false; }
public boolean matches(String name) { for (ClassDoc cd : packageDoc.allClasses()) { if (cd.qualifiedName().equals(name)) return true; } return false; }
/** * Convert the Classes in the given Package to an HTML. * @param configuration the configuration. * @param pd the Package to convert. * @param outputdir the name of the directory to output to. */ public static void convertPackage(Configuration configuration, PackageDoc pd, String outputdir) { if (pd == null || outputdir == null) { return; } String classOutputdir = getPackageOutputDir(outputdir, pd); ClassDoc[] cds = pd.allClasses(); for (int i = 0; i < cds.length; i++) { convertClass(configuration, cds[i], classOutputdir); } }
/** * Convert the Classes in the given Package to an HTML. * * @param pd the Package to convert. * @param outputdir the name of the directory to output to. */ public void convertPackage(PackageDoc pd, DocPath outputdir) { if (pd == null) { return; } ClassDoc[] cds = pd.allClasses(); for (int i = 0; i < cds.length; i++) { // If -nodeprecated option is set and the class is marked as deprecated, // do not convert the package files to HTML. We do not check for // containing package deprecation since it is already check in // the calling method above. if (!(configuration.nodeprecated && Util.isDeprecated(cds[i]))) convertClass(cds[i], outputdir); } }
/** * Return all of the classes specified on the command-line that * belong to the given package. * @param packageDoc the package to return the classes for. */ public ClassDoc[] allClasses(PackageDoc pkgDoc) { return pkgDoc.isIncluded() ? pkgDoc.allClasses() : getArray(allClasses, Util.getPackageName(pkgDoc)); }
/** * Return all of the classes specified on the command-line that * belong to the given package. * @param pkgDoc the package to return the classes for. */ public ClassDoc[] allClasses(PackageDoc pkgDoc) { return pkgDoc.isIncluded() ? pkgDoc.allClasses() : getArray(allClasses, Util.getPackageName(pkgDoc)); }
/** * Build the summary for the current class. * * @param elements the list of XML elements that make up the class * constant summary. */ public void buildClassConstantSummary(List<?> elements) { ClassDoc[] classes = currentPackage.name().length() > 0 ? currentPackage.allClasses() : configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); Arrays.sort(classes); for (int i = 0; i < classes.length; i++) { if (! classDocsWithConstFields.contains(classes[i]) || ! classes[i].isIncluded()) { continue; } currentClass = classes[i]; //Build the documentation for the current class. build(elements); } }
/** * Iterate through all classes and construct documentation for them. * * @param root the RootDoc of source to document. * @param classtree the data structure representing the class tree. */ protected void generateClassFiles(RootDoc root, ClassTree classtree) { generateClassFiles(classtree); PackageDoc[] packages = root.specifiedPackages(); for (int i = 0; i < packages.length; i++) { generateClassFiles(packages[i].allClasses(), classtree); } }
/** * Iterate through all classes and construct documentation for them. * * @param root the RootDoc of source to document. * @param classtree the data structure representing the class tree. */ protected void generateClassFiles(RootDoc root, ClassTree classtree) { generateClassFiles(classtree); PackageDoc[] packages = root.specifiedPackages(); for (int i = 0; i < packages.length; i++) { generateClassFiles(packages[i].allClasses(), classtree); } }
ClassDoc[] content = pkgdoc.allClasses(); for (int i = 0; i < content.length; ++i) { ClassDoc usedClass = content[i];
/** * Return true if the given package has constant fields to document. * * @param pkg the package being checked. * @return true if the given package has constant fields to document. */ private boolean hasConstantField(PackageDoc pkg) { ClassDoc[] classes; if (pkg.name().length() > 0) { classes = pkg.allClasses(); } else { classes = configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); } boolean found = false; for (int j = 0; j < classes.length; j++){ if (classes[j].isIncluded() && hasConstantField(classes[j])) { found = true; } } return found; }
ClassDoc[] content = pkgdoc.allClasses(); for( int i = 0; i < content.length; ++i )
/** * Return true if the given package has constant fields to document. * * @param pkg the package being checked. * @return true if the given package has constant fields to document. */ private boolean hasConstantField(PackageDoc pkg) { ClassDoc[] classes; if (pkg.name().length() > 0) { classes = pkg.allClasses(); } else { classes = configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); } boolean found = false; for (int j = 0; j < classes.length; j++){ if (classes[j].isIncluded() && hasConstantField(classes[j])) { found = true; } } return found; }
/** * Build the summary for the current class. * * @param node the XML element that specifies which components to document * @param summariesTree the tree to which the class constant summary will be added */ public void buildClassConstantSummary(XMLNode node, Content summariesTree) { ClassDoc[] classes = currentPackage.name().length() > 0 ? currentPackage.allClasses() : configuration.classDocCatalog.allClasses( DocletConstants.DEFAULT_PACKAGE_NAME); Arrays.sort(classes); Content classConstantTree = writer.getClassConstantHeader(); for (int i = 0; i < classes.length; i++) { if (! classDocsWithConstFields.contains(classes[i]) || ! classes[i].isIncluded()) { continue; } currentClass = classes[i]; //Build the documentation for the current class. buildChildren(node, classConstantTree); } summariesTree.addContent(classConstantTree); }
/** * Build the package serialized for for the current package being processed. */ public void buildPackageSerializedForm(List<?> elements) { String foo = currentPackage.name(); ClassDoc[] classes = currentPackage.allClasses(false); if (classes == null || classes.length == 0) { return; } if (!serialInclude(currentPackage)) { return; } if (!serialClassFoundToDocument(classes)) { return; } build(elements); }
public void buildClassSerializedForm(List<?> elements) { ClassDoc[] classes = currentPackage.allClasses(false); Arrays.sort(classes); for (int j = 0; j < classes.length; j++) { currentClass = classes[j]; fieldWriter = writer.getSerialFieldWriter(currentClass); methodWriter = writer.getSerialMethodWriter(currentClass); if(currentClass.isClass() && currentClass.isSerializable()) { if(!serialClassInclude(currentClass)) { continue; } build(elements); } } }
if (methodName.equals("allClasses")) { if (isFiltered(args)) { return filter(((PackageDoc) target).allClasses(true), ClassDoc.class); } else { return filter(((PackageDoc) target).allClasses(), ClassDoc.class);
if (methodName.equals("allClasses")) { if (isFiltered(args)) { return filter(((PackageDoc) target).allClasses(true), ClassDoc.class); } else { return filter(((PackageDoc) target).allClasses(), ClassDoc.class);
/** * Build the package serialized form for the current package being processed. * * @param node the XML element that specifies which components to document * @param serializedSummariesTree content tree to which the documentation will be added */ public void buildPackageSerializedForm(XMLNode node, Content serializedSummariesTree) { Content packageSerializedTree = writer.getPackageSerializedHeader(); String foo = currentPackage.name(); ClassDoc[] classes = currentPackage.allClasses(false); if (classes == null || classes.length == 0) { return; } if (!serialInclude(currentPackage)) { return; } if (!serialClassFoundToDocument(classes)) { return; } buildChildren(node, packageSerializedTree); serializedSummariesTree.addContent(packageSerializedTree); }
/** * Build the class serialized form. * * @param node the XML element that specifies which components to document * @param packageSerializedTree content tree to which the documentation will be added */ public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) { Content classSerializedTree = writer.getClassSerializedHeader(); ClassDoc[] classes = currentPackage.allClasses(false); Arrays.sort(classes); for (int j = 0; j < classes.length; j++) { currentClass = classes[j]; fieldWriter = writer.getSerialFieldWriter(currentClass); methodWriter = writer.getSerialMethodWriter(currentClass); if(currentClass.isClass() && currentClass.isSerializable()) { if(!serialClassInclude(currentClass)) { continue; } Content classTree = writer.getClassHeader(currentClass); buildChildren(node, classTree); classSerializedTree.addContent(classTree); } } packageSerializedTree.addContent(classSerializedTree); }