本文整理匯總了Java中com.sun.javadoc.ClassDoc.superclass方法的典型用法代碼示例。如果您正苦於以下問題:Java ClassDoc.superclass方法的具體用法?Java ClassDoc.superclass怎麽用?Java ClassDoc.superclass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.sun.javadoc.ClassDoc
的用法示例。
在下文中一共展示了ClassDoc.superclass方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getTestMethods
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
/**
* Returns an array containing all of the "test" methods (including those that are inherited) for
* the given class.
*/
private static MethodDoc[] getTestMethods(ClassDoc c) {
Set set = new TreeSet();
while (c != null) {
MethodDoc[] methods = c.methods();
for (int i = 0; i < methods.length; i++) {
MethodDoc method = methods[i];
if (method.isPublic() && method.parameters().length == 0
&& method.name().startsWith("test")) {
set.add(method);
}
}
c = c.superclass();
}
return (MethodDoc[]) set.toArray(new MethodDoc[0]);
}
示例2: getAllFieldDocs
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
private void getAllFieldDocs(ClassDoc classDoc, List<FieldDoc> fieldDocs) {
if (classDoc.superclass() != null) {
this.getAllFieldDocs(classDoc.superclass(), fieldDocs);
}
if (isValidPSItem(classDoc)) {
fieldDocs.addAll(Arrays.asList(classDoc.fields()));
}
}
示例3: getModificationRecords
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected LinkedList<ModificationRecord> getModificationRecords(ClassDoc classDoc) {
ClassDoc superClass = classDoc.superclass();
if (superClass == null) {
return new LinkedList<ModificationRecord>();
}
LinkedList<ModificationRecord> result = this.getModificationRecords(superClass);
result.addAll(this.parseModificationRecords(classDoc.tags()));
return result;
}
示例4: printClassMembers
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
static void printClassMembers(RootDoc root, ClassDoc cls) {
root.printNotice("Members for: " + cls);
root.printNotice(" extends " + Arrays.asList(cls.superclass()));
root.printNotice(" Fields: ");
printMembers(root, cls.fields());
root.printNotice(" Constructor: ");
printMembers(root, cls.constructors());
root.printNotice(" Method: ");
printMembers(root, cls.methods());
if (cls.superclass() != null && !cls.superclassType().toString().equals("java.lang.Object"))
printClassMembers(root, cls.superclass());
}