AbstractIndexWriterpublic class AbstractIndexWriter extends HtmlStandardWriter Generate Index for all the Member Names with Indexing in
Unicode Order. This class is a base class for {@link SingleIndexWriter} and
{@link SplitIndexWriter}. It uses the functionality from
{@link HtmlStandardWriter} and {@link HtmlWriter} to generate the Index
Contents. |
Fields Summary |
---|
protected IndexBuilder | indexbuilderThe index of all the members with unicode character. |
Constructors Summary |
---|
protected AbstractIndexWriter(String path, String filename, String relpath, IndexBuilder indexbuilder)This constructor will be used by {@link SplitIndexWriter}. Initialises
path to this file and relative path from this file.
super(path, filename, relpath);
this.indexbuilder = indexbuilder;
| protected AbstractIndexWriter(String filename, IndexBuilder indexbuilder)This Constructor will be used by {@link SingleIndexWriter}.
super(filename);
this.indexbuilder = indexbuilder;
|
Methods Summary |
---|
protected void | generateContents(java.lang.Character unicode, java.util.List memberlist)Generate the member information for the unicode character along with the
list of the members.
anchor("_" + unicode + "_");
h2();
bold(unicode.toString());
h2End();
dl();
for (int i = 0; i < memberlist.size(); i++) {
Doc element = (Doc)memberlist.get(i);
if (element instanceof MemberDoc) {
printDescription((MemberDoc)element);
} else if (element instanceof ClassDoc) {
printDescription((ClassDoc)element);
} else if (element instanceof PackageDoc) {
printDescription((PackageDoc)element);
}
}
dlEnd();
hr();
| protected void | navLinkIndex()Print the text "Index" in bold format in the navigation bar.
navCellRevStart();
fontStyle("NavBarFont1Rev");
boldText("doclet.Index");
fontEnd();
navCellEnd();
| protected void | printClassInfo(com.sun.javadoc.ClassDoc cd)What is the classkind? Print the classkind(class, interface, exception,
error of the class passed.
if (cd.isOrdinaryClass()) {
print("class ");
} else if (cd.isInterface()) {
print("interface ");
} else if (cd.isException()) {
print("exception ");
} else { // error
print("error ");
}
printPreQualifiedClassLink(cd);
print('.");
| protected void | printComment(com.sun.javadoc.ProgramElementDoc element)Print comment for each element in the index. If the element is deprecated
and it has a @deprecated tag, use that comment. Else if the containing
class for this element is deprecated, then add the word "Deprecated." at
the start and then print the normal comment.
Tag[] tags;
if ((tags = element.tags("deprecated")).length > 0) {
boldText("doclet.Deprecated"); space();
printInlineDeprecatedComment(tags[0]);
} else {
ClassDoc cont = element.containingClass();
while (cont != null) {
if (cont.tags("deprecated").length > 0) {
boldText("doclet.Deprecated"); space();
break;
}
cont = cont.containingClass();
}
printSummaryComment(element);
}
| protected void | printDescription(com.sun.javadoc.PackageDoc pd)Print one line summary comment for the package.
dt();
printPackageLink(pd, true);
print(" - ");
print("package " + pd.name());
dd();
printSummaryComment(pd);
| protected void | printDescription(com.sun.javadoc.ClassDoc cd)Print one line summary comment for the class.
dt();
printClassLink(cd, true);
print(" - ");
printClassInfo(cd);
dd();
printComment(cd);
| protected void | printDescription(com.sun.javadoc.MemberDoc element)Generate Description for Class, Field, Method or Constructor.
for Java.* Packages Class Members.
String name = (element instanceof ExecutableMemberDoc)?
element.name() +
((ExecutableMemberDoc)element).flatSignature():
element.name();
ClassDoc containing = element.containingClass();
String qualname = containing.qualifiedName();
String baseClassName = containing.name();
dt();
printDocLink(element, name, true);
println(" - ");
printMemberDesc(element);
println();
dd();
printComment(element);
println();
| protected void | printMemberDesc(com.sun.javadoc.MemberDoc member)Print description about the Static Varible/Method/Constructor for a
member.
ClassDoc containing = member.containingClass();
String classdesc = (containing.isInterface()? "interface ": "class ") +
getPreQualifiedClassLink(containing);
if (member.isField()) {
if (member.isStatic()) {
printText("doclet.Static_variable_in", classdesc);
} else {
printText("doclet.Variable_in", classdesc);
}
} else if (member.isConstructor()) {
printText("doclet.Constructor_for", classdesc);
} else if (member.isMethod()) {
if (member.isStatic()) {
printText("doclet.Static_method_in", classdesc);
} else {
printText("doclet.Method_in", classdesc);
}
}
|
|