Methods Summary |
---|
protected void | adjustIndexMap(com.sun.javadoc.Doc[] elements)Adjust list of members according to their names. Check the first
character in a member name, and then add the member to a list of members
for that particular unicode character.
for (int i = 0; i < elements.length; i++) {
if (shouldAddToIndexMap(elements[i])) {
String name = elements[i].name();
char ch = (name.length()==0)?
'*" :
Character.toUpperCase(name.charAt(0));
Character unicode = new Character(ch);
List list = (List)indexmap.get(unicode);
if (list == null) {
list = new ArrayList();
indexmap.put(unicode, list);
}
list.add(elements[i]);
}
}
|
protected void | buildIndexMap(com.sun.javadoc.RootDoc root)Get all the members in all the Packages and all the Classes
given on the command line. Form separate list of those members depending
upon their names.
PackageDoc[] packages = root.specifiedPackages();
ClassDoc[] classes = root.classes();
List list = new ArrayList();
if (!classesOnly) {
adjustIndexMap(packages);
}
adjustIndexMap(classes);
if (!classesOnly) {
for (int i = 0; i < classes.length; i++) {
if (shouldAddToIndexMap(classes[i])) {
putMembersInIndexMap(classes[i]);
}
}
}
sortIndexMap();
|
public java.lang.Object[] | elements()Array of IndexMap keys, Unicode characters.
return elements;
|
public java.util.Map | getIndexMap()Return a map of all the individual member lists with Unicode character.
return indexmap;
|
public java.util.List | getMemberList(java.lang.Character index)Return the sorted list of members, for passed Unicode Character.
return (List)indexmap.get(index);
|
protected void | putMembersInIndexMap(com.sun.javadoc.ClassDoc classdoc)Put all the members(fields, methods and constructors) in the classdoc
to the indexmap.
adjustIndexMap(classdoc.fields());
adjustIndexMap(classdoc.methods());
adjustIndexMap(classdoc.constructors());
|
protected boolean | shouldAddToIndexMap(com.sun.javadoc.Doc element)Should this doc element be added to the index map?
return !(noDeprecated && element.tags("deprecated").length > 0);
|
protected void | sortIndexMap()Sort the index map. Traverse the index map for all it's elements and
sort each element which is a list.
for (Iterator it = indexmap.values().iterator(); it.hasNext(); ) {
Collections.sort((List)it.next());
}
|