Methods Summary |
---|
public static java.util.List | asList(com.sun.javadoc.ProgramElementDoc[] members)
List list = new ArrayList();
for (int i = 0; i < members.length; i++) {
list.add(members[i]);
}
return list;
|
private static void | buildInterfaces(java.util.Set interfaces, com.sun.javadoc.ClassDoc cd)
ClassDoc[] iin = cd.interfaces();
for (int i = 0; i < iin.length; i++) {
interfaces.add(iin[i]);
buildInterfaces(interfaces, iin[i]);
}
|
public static void | copyFile(java.io.File destfile, java.io.File srcfile)Copy source file to destination file.
byte[] bytearr = new byte[512];
int len = 0;
FileInputStream input = new FileInputStream(srcfile);
FileOutputStream output = new FileOutputStream(destfile);
try {
while ((len = input.read(bytearr)) != -1) {
output.write(bytearr, 0, len);
}
} catch (FileNotFoundException exc) {
} catch (SecurityException exc) {
} finally {
input.close();
output.close();
}
|
public static com.sun.javadoc.ProgramElementDoc[] | excludeDeprecatedMembers(com.sun.javadoc.ProgramElementDoc[] members)Return array of class members whose documentation is to be generated.
If the member is deprecated do not include such a member in the
returned array.
return
toProgramElementDocArray(excludeDeprecatedMembersAsList(members));
|
public static java.util.List | excludeDeprecatedMembersAsList(com.sun.javadoc.ProgramElementDoc[] members)Return array of class members whose documentation is to be generated.
If the member is deprecated do not include such a member in the
returned array.
List list = new ArrayList();
for (int i = 0; i < members.length; i++) {
if (members[i].tags("deprecated").length == 0) {
list.add(members[i]);
}
}
Collections.sort(list);
return list;
|
public static com.sun.javadoc.MethodDoc | findMethod(com.sun.javadoc.ClassDoc cd, com.sun.javadoc.MethodDoc method)Search for the given method in the given class.
MethodDoc[] methods = cd.methods();
for (int i = 0; i < methods.length; i++) {
if (method.name().equals(methods[i].name()) &&
method.signature().equals(methods[i].signature())) {
return methods[i];
}
}
return null;
|
public static com.sun.javadoc.ClassDoc[] | getAllInterfaces(com.sun.javadoc.ClassDoc classdoc)For the class return all implemented interfaces including the
superinterfaces of the implementing interfaces, also iterate over for
all the superclasses. For interface return all the extended interfaces
as well as superinterfaces for those extended interfaces.
Set interfaces = new HashSet();
buildInterfaces(interfaces, classdoc);
if (classdoc.isClass()) {
ClassDoc icd = classdoc.superclass();
while (icd != null) {
buildInterfaces(interfaces, icd);
icd = icd.superclass();
}
}
ClassDoc[] intarr = new ClassDoc[interfaces.size()];
interfaces.toArray(intarr);
Arrays.sort(intarr);
return intarr;
|
public static boolean | isCoreClass(com.sun.javadoc.ClassDoc cd)According to the Java Language Specifications, all the outer classes
and static inner classes are core classes.
return cd.containingClass() == null || cd.isStatic();
|
public static boolean | matches(com.sun.javadoc.ProgramElementDoc doc1, com.sun.javadoc.ProgramElementDoc doc2)
if (doc1 instanceof ExecutableMemberDoc &&
doc2 instanceof ExecutableMemberDoc) {
ExecutableMemberDoc ed1 = (ExecutableMemberDoc)doc1;
ExecutableMemberDoc ed2 = (ExecutableMemberDoc)doc2;
return ed1.name().equals(ed2.name()) &&
ed1.signature().equals(ed2.signature());
} else {
return doc1.name().equals(doc2.name());
}
|
public static boolean | nonPublicMemberFound(com.sun.javadoc.ProgramElementDoc[] members)Return true if a non-public member found in the given array.
for (int i = 0; i < members.length; i++) {
if (!members[i].isPublic()) {
return true;
}
}
return false;
|
public static com.sun.javadoc.ProgramElementDoc[] | toProgramElementDocArray(java.util.List list)Return the list of ProgramElementDoc objects as Array.
ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()];
for (int i = 0; i < list.size(); i++) {
pgmarr[i] = (ProgramElementDoc)(list.get(i));
}
return pgmarr;
|