ConstantsSummaryBuilder.java revision 0
/*
* Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/**
* Builds the Constants Summary Page.
*
* This code is not part of an API.
* It is implementation that is subject to change.
* Do not use it as an API
*
* @author Jamie Ho
* @since 1.5
*/
public class ConstantsSummaryBuilder extends AbstractBuilder {
/**
* The root element of the constant summary XML is {@value}.
*/
/**
* The maximum number of package directories shown in the constant
* value index.
*/
public static final int MAX_CONSTANT_VALUE_INDEX_LENGTH = 2;
/**
* The writer used to write the results.
*/
protected ConstantsSummaryWriter writer;
/**
* The set of ClassDocs that have constant fields.
*/
protected Set classDocsWithConstFields;
/**
* The set of printed package headers.
*/
protected Set printedPackageHeaders;
/**
* The current package being documented.
*/
private PackageDoc currentPackage;
/**
* The current class being documented.
*/
private ClassDoc currentClass;
/**
* Construct a new ConstantsSummaryBuilder.
*
* @param configuration the current configuration of the
* doclet.
*/
super(configuration);
}
/**
* Construct a ConstantsSummaryBuilder.
*
* @param configuration the configuration used in this run
* of the doclet.
* @param writer the writer for the summary.
*/
public static ConstantsSummaryBuilder getInstance(
return builder;
}
/**
* {@inheritDoc}
*/
throws Exception {
if (DEBUG) {
+ "." + methodName);
}
}
/**
* {@inheritDoc}
*/
public void build() throws IOException {
//Doclet does not support this output.
return;
}
}
/**
* {@inheritDoc}
*/
return ROOT;
}
/**
* Build the constant summary.
*
* @param elements the list of elements describing constant summary
* documentation.
*/
}
/**
* Build the header.
*/
public void buildHeader() {
}
/**
* Build the footer.
*/
public void buildFooter() {
}
/**
* Build the table of contents.
*/
public void buildContents() {
printedPackageHeaders = new HashSet();
}
}
}
/**
* Build the summary for each documented package.
*
* @param elements the XML elements that represent the components
* of documentation for each package.
*/
printedPackageHeaders = new HashSet();
if (hasConstantField(packages[i])) {
currentPackage = packages[i];
//Build the documentation for the current package.
}
}
}
/**
* Build the summary for the current package.
*
* @param elements the list of XML elements that make up package
* documentation.
*/
}
/**
* Build the summary for the current class.
*
* @param elements the list of XML elements that make up the class
* constant summary.
*/
! classes[i].isIncluded()) {
continue;
}
currentClass = classes[i];
//Build the documentation for the current class.
}
}
/**
* Build the header for the given class.
*/
public void buildPackageHeader() {
}
}
/**
* Build the header for the given class.
*/
public void buildClassHeader() {
}
/**
* Print summary of constant members in the
* class.
*/
public void buildConstantMembers() {
}
/**
* Build the footer for the given class.
*/
public void buildClassFooter() {
}
/**
* 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.
*/
} else {
}
boolean found = false;
found = true;
}
}
return found;
}
/**
* Return true if the given class has constant fields to document.
*
* @param classDoc the class being checked.
* @return true if the given package has constant fields to document.
*/
return true;
}
}
return false;
}
/**
* Return true if the given package name has been printed. Also
* return true if the root of this package has been printed.
*
* @param pkgname the name of the package to check.
*/
return true;
}
}
return false;
}
/**
* Print the table of constants.
*
* @author Jamie Ho
* @since 1.4
*/
private class ConstantFieldBuilder {
/**
* The map used to get the visible variables.
*/
/**
* The map used to get the visible variables.
*/
/**
* The classdoc that we are examining constants for.
*/
/**
* Construct a ConstantFieldSubWriter.
* @param classdoc the classdoc that we are examining constants for.
*/
}
/**
* Builds the table of constants for a given class.
*/
protected void buildMembersSummary() {
}
}
/**
* Return the list of visible constant fields for the given classdoc.
* @param cd the classdoc to examine.
* @return the list of visible constant fields for the given classdoc.
*/
if(l != null){
} else {
return null;
}
}
}
return inclList;
}
}
/**
* Parse the package name. We only want to display package name up to
* 2 levels.
*/
int index = -1;
for (int j = 0; j < MAX_CONSTANT_VALUE_INDEX_LENGTH; j++) {
}
if (index != -1) {
}
return pkgname;
}
}