本文整理汇总了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());
}