當前位置: 首頁>>代碼示例>>Java>>正文


Java ClassDoc.name方法代碼示例

本文整理匯總了Java中com.sun.javadoc.ClassDoc.name方法的典型用法代碼示例。如果您正苦於以下問題:Java ClassDoc.name方法的具體用法?Java ClassDoc.name怎麽用?Java ClassDoc.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sun.javadoc.ClassDoc的用法示例。


在下文中一共展示了ClassDoc.name方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PSItemDoc

import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
private PSItemDoc(ClassDoc classDoc) {
    this.classDoc = classDoc;
    this.name = classDoc.name();
    this.description = classDoc.commentText();
    this.itemFieldDocs = new ArrayList<>();
    this.providerDocs = new ArrayList<>();

    List<FieldDoc> allFields = new ArrayList<>();
    this.getAllFieldDocs(classDoc, allFields);

    for (FieldDoc fieldDoc : allFields) {
        PSItemFieldDoc itemFieldDoc = PSItemFieldDoc.build(this, fieldDoc);
        if (itemFieldDoc != null) this.itemFieldDocs.add(itemFieldDoc);
    }

    for (MethodDoc methodDoc : classDoc.methods()) {
        PSOperatorDoc providerDoc = PSOperatorDoc.build(classDoc, methodDoc);
        if (providerDoc != null) this.providerDocs.add(providerDoc);
    }
}
 
開發者ID:PrivacyStreams,項目名稱:PrivacyStreams,代碼行數:21,代碼來源:PSItemDoc.java

示例2: PSOperatorDoc

import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
private PSOperatorDoc(ClassDoc classDoc, MethodDoc methodDoc) {
        this.declaringClassDoc = classDoc;
        this.methodDoc = methodDoc;
        this.description = methodDoc.commentText().replace('\n', ' ');
        this.paramDesc = "";

        Tag[] paramTags = methodDoc.tags("param");
        for (Tag paramTag : paramTags) {
            String paraStr = paramTag.text();
            String paraName = paraStr.substring(0, paraStr.indexOf(' ')).replace('\n', ' ');;
            String paraDesc = paraStr.substring(paraStr.indexOf(' ') + 1).replace('\n', ' ');;
            this.paramDesc += "<br> - `" + paraName + "`: " + paraDesc;
        }

        this.returnType = methodDoc.returnType();
//        ParameterizedType returnType = methodDoc.returnType().asParameterizedType();
//        this.inputType = returnType.typeArguments()[0];
//        this.outputType = returnType.typeArguments()[1];
//        this.completeSignature = "Function<" + this.inputType + ", " + this.outputType + "> " + methodDoc.toString();

        String shortSignature = classDoc.name() + "." + methodDoc.name() + "(";
        boolean firstParameter = true;
        for (Parameter parameter : methodDoc.parameters()) {
            if (firstParameter) {
                shortSignature += Utils.getSimpleTypeName(parameter.type()) + " " + parameter.name();
                firstParameter = false;
            } else {
                shortSignature += ", " + Utils.getSimpleTypeName(parameter.type()) + " " + parameter.name();
            }
        }
        shortSignature += ")";
        this.shortSignature = shortSignature;
    }
 
開發者ID:PrivacyStreams,項目名稱:PrivacyStreams,代碼行數:34,代碼來源:PSOperatorDoc.java

示例3: PSOperatorWrapperDoc

import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
private PSOperatorWrapperDoc(ClassDoc classDoc) {
    this.classDoc = classDoc;
    this.name = classDoc.name();
    this.description = classDoc.commentText();
    this.operatorDocs = new ArrayList<>();

    for (MethodDoc methodDoc : classDoc.methods()) {
        PSOperatorDoc operatorDoc = PSOperatorDoc.build(classDoc, methodDoc);
        if (operatorDoc != null) this.operatorDocs.add(operatorDoc);
    }
}
 
開發者ID:PrivacyStreams,項目名稱:PrivacyStreams,代碼行數:12,代碼來源:PSOperatorWrapperDoc.java

示例4: instanceOf

import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
public static boolean instanceOf(ClassDoc classDoc, String superClassName) {
        if (classDoc == null || superClassName == null) return false;
        String className = classDoc.containingPackage().name() + "." + classDoc.name();
//        System.out.println(className + " " + superClassName);
        if (className.startsWith(superClassName)) {
            return true;
        }
        return instanceOf(classDoc.superclass(), superClassName);
    }
 
開發者ID:PrivacyStreams,項目名稱:PrivacyStreams,代碼行數:10,代碼來源:Utils.java

示例5: forName

import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
/**
 * Return the path for the simple name of the class.
 * For example, if the class is java.lang.Object,
 * the path is Object.html.
 */
public static DocPath forName(ClassDoc cd) {
    return (cd == null) ? empty : new DocPath(cd.name() + ".html");
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:9,代碼來源:DocPath.java


注:本文中的com.sun.javadoc.ClassDoc.name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。