当前位置: 首页>>代码示例>>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;未经允许,请勿转载。