当前位置: 首页>>代码示例>>Java>>正文


Java ConstructorDoc类代码示例

本文整理汇总了Java中com.sun.javadoc.ConstructorDoc的典型用法代码示例。如果您正苦于以下问题:Java ConstructorDoc类的具体用法?Java ConstructorDoc怎么用?Java ConstructorDoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ConstructorDoc类属于com.sun.javadoc包,在下文中一共展示了ConstructorDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toConstructorsNode

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
/**
 * Returns the .
 *
 * @param constructors The constructors.
 * @param node The node to add the XML to.
 */
private static XMLNode toConstructorsNode(ConstructorDoc[] constructors) {
  if (constructors.length < 1) return null;

  // Create the <constructors> node
  XMLNode node = new XMLNode("constructors");

  // Add the <constructor> nodes
  for (ConstructorDoc  constructor : constructors) {
    XMLNode c = new XMLNode("constructor");
    updateExecutableMemberNode(constructor, c);
    node.child(c);
  }

  return node;
}
 
开发者ID:pageseeder,项目名称:xmldoclet,代码行数:22,代码来源:XMLDoclet.java

示例2: parseIdentifier

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
private String parseIdentifier(Doc doc) {
  if (doc instanceof ClassDoc) {
    ClassDoc classDoc = (ClassDoc) doc;

    return parseIdentifier((Doc) classDoc.containingPackage()) + classDoc.name() + "/";
  } else if (doc instanceof AnnotationTypeElementDoc) {
    AnnotationTypeElementDoc annotationTypeElementDoc = (AnnotationTypeElementDoc) doc;
    return parseIdentifier((Doc) annotationTypeElementDoc.containingClass()) + "#" + annotationTypeElementDoc.name();
  } else if (doc instanceof FieldDoc) {
    FieldDoc fieldDoc = (FieldDoc) doc;
    return parseIdentifier((Doc) fieldDoc.containingClass()) + "#" + fieldDoc.name();
  } else if (doc instanceof ConstructorDoc) {
    ConstructorDoc constructorDoc = (ConstructorDoc) doc;
    return parseIdentifier((Doc) constructorDoc.containingClass()) + "#" + constructorDoc.name() + URLEncoder.encode(constructorDoc.flatSignature());
  } else if (doc instanceof MethodDoc) {
    MethodDoc methodDoc = (MethodDoc) doc;
    return parseIdentifier((Doc) methodDoc.containingClass()) + "#" + methodDoc.name() + URLEncoder.encode(methodDoc.flatSignature());
  } else {
    return "/" + doc.name() + "/";
  }
}
 
开发者ID:riptano,项目名称:xml-doclet,代码行数:22,代码来源:Parser.java

示例3: toConstructorsNode

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
/**
 * Returns the .
 *
 * @param constructors The constructors.
 * @param node The node to add the XML to.
 */
private static XMLNode toConstructorsNode(ConstructorDoc[] constructors) {
  if (constructors.length < 1) return null;

  // Create the <constructors> node
  XMLNode node = new XMLNode("constructors");

  // Add the <constructor> nodes
  for (ConstructorDoc  constructor : constructors) {
    XMLNode c = new XMLNode("constructor");
    updateExecutableMemberNode(constructor, c);
    // standard block tags
    c.child(toStandardTags(constructor));
    // deprecated
    toDeprecated(constructor, c);
    node.child(c);
  }

  return node;
}
 
开发者ID:bazooka,项目名称:bazooka-wo-xmldoclet,代码行数:26,代码来源:XMLDoclet.java

示例4: constructorInfo

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
private SignatureInformation constructorInfo(ExecutableElement method) {
    Optional<ConstructorDoc> doc = docs.constructorDoc(docs.methodKey(method));
    Optional<String> docText =
            doc.flatMap(constructor -> Optional.ofNullable(constructor.commentText()))
                    .map(Javadocs::htmlToMarkdown)
                    .map(Javadocs::firstSentence);

    return new SignatureInformation(
            Hovers.methodSignature(method, false, true),
            docText.orElse(null),
            paramInfo(method));
}
 
开发者ID:georgewfraser,项目名称:vscode-javac,代码行数:13,代码来源:Signatures.java

示例5: getSortedConstructors

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
protected ConstructorDoc[] getSortedConstructors(ClassDoc classDoc)
{
   ConstructorDoc[] result = (ConstructorDoc[])sortedConstructorMap.get(classDoc);
   if (null == result) {
      ConstructorDoc[] constructors = classDoc.constructors();
      result = (ConstructorDoc[])constructors.clone();
      Arrays.sort(result);
      return result;
   }
   return result;
}
 
开发者ID:vilie,项目名称:javify,代码行数:12,代码来源:AbstractDoclet.java

示例6: hasMethods

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
private boolean hasMethods(ClassDoc clz) {
  int countExportedMethods = 0;
  for (ConstructorDoc cd : clz.constructors()) {
    if (isExportable(cd)) {
      countExportedMethods++;
    }
  }
  for (MethodDoc md : clz.methods()) {
    if (isExportable(md)) {
      countExportedMethods++;
    }
  }
  return countExportedMethods > 0;
}
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:15,代码来源:ChronoscopeDoclet.java

示例7: isExportable

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
private boolean isExportable(ConstructorDoc cd) {
  boolean export = isExported(cd.containingClass());
  for (AnnotationDesc a : cd.annotations()) {
    if (a.annotationType().name().equals("Export")) {
      export = true;
    }
    if (a.annotationType().name().equals("NoExport")) {
      export = false;
    }
  }
  return export;
}
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:13,代码来源:ChronoscopeDoclet.java

示例8: processConstructorDocs

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
/**
 * @return full JSON objects for the given ConstructorDoc[]
 */
protected JSONArray processConstructorDocs(ConstructorDoc[] constructorDocs) {
    JSONArray retMe = new JSONArray();
    for (ConstructorDoc constructorDoc: constructorDocs) {
        retMe.add( processConstructorDoc( constructorDoc ) );
    }
    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:11,代码来源:JsonDoclet.java

示例9: processConstructorDocStubs

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
/**
 * @return JSON stubs for the given ConstructorDoc[].
 */
protected JSONArray processConstructorDocStubs(ConstructorDoc[] constructorDocs) {
    JSONArray retMe = new JSONArray();
    for (ConstructorDoc constructorDoc: constructorDocs) {
        retMe.add( processConstructorDocStub( constructorDoc ) );
    }
    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:11,代码来源:JsonDoclet.java

示例10: process

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
int process(Parser parser, char[] source, int startIndex, int endIndex) throws IOException, ParseException {

         //ctx.fieldList.add(FieldDocImpl.createFromSource(source, startIndex, endIndex));

         //System.out.println("function match '"+new String(source,startIndex,endIndex-startIndex)+"'");
         ExecutableMemberDocImpl execDoc=MethodDocImpl.createFromSource(parser.ctx.classDoc,
                                                                        parser.ctx.classDoc.containingPackage(),
                                                                        source, startIndex, endIndex);

         if (parser.getAddComments())
            execDoc.setRawCommentText(parser.getLastComment());

         parser.setLastComment(null);

         if (execDoc.isMethod()) {
            MethodDoc methDoc = (MethodDoc) execDoc;
            parser.ctx.methodList.add(methDoc);
            if (methDoc.isIncluded()) {
               parser.ctx.filteredMethodList.add(methDoc);
            }
            if (methDoc.name().equals("readObject")
                      || methDoc.name().equals("writeObject")
                      || methDoc.name().equals("readExternal")
                      || methDoc.name().equals("writeExternal")
                      || methDoc.name().equals("readResolve")) {
           // FIXME: add readExternal here?

            parser.ctx.maybeSerMethodList.add(methDoc);
           }
         } else {
             ConstructorDoc constDoc = (ConstructorDoc) execDoc;
             parser.ctx.constructorList.add(constDoc);
             if (constDoc.isIncluded()) {
               parser.ctx.filteredConstructorList.add(constDoc);
             }
         }

         return endIndex;
      }
 
开发者ID:cfriedt,项目名称:classpath,代码行数:40,代码来源:Parser.java

示例11: classClosed

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
void classClosed() throws ParseException, IOException {
   ctx.classDoc.setFields(toArray(ctx.fieldList,new FieldDoc[ctx.fieldList.size()]));
   ctx.classDoc.setFilteredFields(toArray(ctx.filteredFieldList,new FieldDoc[ctx.filteredFieldList.size()]));
   ctx.classDoc.setSerializableFields(toArray(ctx.sfieldList, new FieldDoc[ctx.sfieldList.size()]));
   ctx.classDoc.setMethods(toArray(ctx.methodList, new MethodDoc[ctx.methodList.size()]));
   ctx.classDoc.setFilteredMethods(toArray(ctx.filteredMethodList, new MethodDoc[ctx.filteredMethodList.size()]));
   ctx.classDoc.setMaybeSerMethodList(ctx.maybeSerMethodList);
   ctx.classDoc.setConstructors(toArray(ctx.constructorList, new ConstructorDoc[ctx.constructorList.size()]));
   ctx.classDoc.setFilteredConstructors(toArray(ctx.filteredConstructorList,
                                                new ConstructorDoc[ctx.filteredConstructorList.size()]));
   ctx.classDoc.setInnerClasses(toArray(ctx.innerClassesList, new ClassDocImpl[ctx.innerClassesList.size()]));
   ctx.classDoc.setFilteredInnerClasses(toArray(ctx.filteredInnerClassesList,
                                                new ClassDocImpl[ctx.filteredInnerClassesList.size()]));
   ctx.classDoc.setBoilerplateComment(boilerplateComment);

   Main.getRootDoc().addClassDoc(ctx.classDoc);

   if (Main.DESCEND_INTERFACES) {
      for (int i=0; i<ctx.classDoc.interfaces().length; ++i) {
         Main.getRootDoc().scheduleClass(ctx.classDoc, ctx.classDoc.interfaces()[i].qualifiedName());
      }
   }

   Debug.log(1,"classClosed: "+ctx.classDoc);

   ctx=(Context)contextStack.pop();
   Debug.log(1, "Popping " + ctx);
   ClassDoc[] referencedClasses=(ClassDoc[])referencedClassesList.toArray(new ClassDoc[0]);

   if (Main.DESCEND_SUPERCLASS) {
      for (int i=0; i<referencedClasses.length; ++i) {
         Main.getRootDoc().scheduleClass(currentClass, referencedClasses[i].qualifiedName());
      }
   }
}
 
开发者ID:cfriedt,项目名称:classpath,代码行数:36,代码来源:Parser.java

示例12: getSignature

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
public String getSignature(Doc doc)
{
    if (doc instanceof MethodDoc)
    {
        return doc.name() + ((MethodDoc) doc).signature();
    } else if (doc instanceof FieldDoc)
    {
        return doc.name();
    } else if (doc instanceof ConstructorDoc)
    {
        return doc.name() + ((ConstructorDoc) doc).signature();
    }
    return doc.name();
}
 
开发者ID:tcolar,项目名称:javaontracks,代码行数:15,代码来源:JOTDocletIndexWriter.java

示例13: getSignature

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
public String getSignature(Doc doc)
{
    if (doc instanceof MethodDoc)
    {
        return doc.name() + ((MethodDoc) doc).signature();
    } else if (doc instanceof FieldDoc)
    {
        return doc.name();
    } else if (doc instanceof ConstructorDoc)
    {
        return doc.name() + ((ConstructorDoc) doc).signature();
    }
    return "";
}
 
开发者ID:tcolar,项目名称:javaontracks,代码行数:15,代码来源:JOTDocletNavView.java

示例14: getConstructors

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
public ConstructorDoc[] getConstructors()
{
    ClassDoc doc = (ClassDoc) getVariables().get("curitem");
    ConstructorDoc[] docs = doc.constructors(false);
    // constructors are not inherited.
    // we show private constructors as this is useful info.
    Arrays.sort(docs);
    return docs;
}
 
开发者ID:tcolar,项目名称:javaontracks,代码行数:10,代码来源:JOTDocletNavView.java

示例15: getParamString

import com.sun.javadoc.ConstructorDoc; //导入依赖的package包/类
public String getParamString(ConstructorDoc doc)
{
    String str = "(";
    Parameter[] params = doc.parameters();
    str = str + processParams(params);
    str += ")";
    return str;
}
 
开发者ID:tcolar,项目名称:javaontracks,代码行数:9,代码来源:JOTDocletNavView.java


注:本文中的com.sun.javadoc.ConstructorDoc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。