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


Java Doc.isField方法代码示例

本文整理汇总了Java中com.sun.javadoc.Doc.isField方法的典型用法代码示例。如果您正苦于以下问题:Java Doc.isField方法的具体用法?Java Doc.isField怎么用?Java Doc.isField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.javadoc.Doc的用法示例。


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

示例1: determineMetaType

import com.sun.javadoc.Doc; //导入方法依赖的package包/类
/**
 * 
 * @return The type that the given Doc represents, e.g. "class", "enum", "method", etc..
 */
protected String determineMetaType(Doc doc) {
    
    if (doc.isEnum()) {
        return "enum";
    } else if (doc.isAnnotationType()) {
        return "annotationType";
    } else if (doc.isClass()) {
        return "class";
    } else if (doc.isInterface()) {
        return "interface";
    } else if (doc.isConstructor()) {
        return "constructor";
    } else if (doc.isMethod()) {
        return "method";
    } else if (doc.isField()) {
        return "field";
    } else if (doc.isEnumConstant()) {
        return "enumConstant";
    } else if (doc.isAnnotationTypeElement()) {
        return "annotationTypeElement";
    } else if (doc instanceof PackageDoc) {
        return "package";
    } else {
        return "unknown";
    }
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:31,代码来源:JsonDoclet.java

示例2: printTaglets

import com.sun.javadoc.Doc; //导入方法依赖的package包/类
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
   for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
      String tagName = (String)it.next();
      Object o = tagletMap.get(tagName);
      Taglet taglet = (Taglet)o;
      Doc doc = context.getDoc();
      if (inline == taglet.isInlineTag()
          && ((doc == null
               && taglet.inOverview())
              || (doc != null
                  && ((doc.isConstructor() && taglet.inConstructor())
                      || (doc.isField() && taglet.inField())
                      || (doc.isMethod() && taglet.inMethod())
                      || (doc instanceof PackageDoc && taglet.inPackage())
                      || ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {

         List tagsOfThisType = new LinkedList();
         for (int i=0; i<tags.length; ++i) {
            if (tags[i].name().substring(1).equals(tagName)) {
               tagsOfThisType.add(tags[i]);
            }
         }

         Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);

         String tagletString;
         if (taglet instanceof StandardTaglet) {
            tagletString = renderTag(tagName, tagletTags, context);
         }
         else if (taglet instanceof GnuExtendedTaglet) {
            tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
         }
         else {
            tagletString = taglet.toString(tagletTags);
         }
         if (null != tagletString) {
            output.printTagletString(tagletString);
         }
      }
   }
}
 
开发者ID:vilie,项目名称:javify,代码行数:43,代码来源:AbstractDoclet.java

示例3: printTaglets

import com.sun.javadoc.Doc; //导入方法依赖的package包/类
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline) 
{
   for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
      String tagName = (String)it.next();
      Object o = tagletMap.get(tagName);
      Taglet taglet = (Taglet)o;
      Doc doc = context.getDoc();
      if (inline == taglet.isInlineTag()
          && ((doc == null 
               && taglet.inOverview())
              || (doc != null 
                  && ((doc.isConstructor() && taglet.inConstructor())
                      || (doc.isField() && taglet.inField())
                      || (doc.isMethod() && taglet.inMethod())
                      || (doc instanceof PackageDoc && taglet.inPackage())
                      || ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {

         List tagsOfThisType = new LinkedList();
         for (int i=0; i<tags.length; ++i) {
            if (tags[i].name().substring(1).equals(tagName)) {
               tagsOfThisType.add(tags[i]);
            }
         }

         Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);

         String tagletString;
         if (taglet instanceof StandardTaglet) {
            tagletString = renderTag(tagName, tagletTags, context);
         }
         else if (taglet instanceof GnuExtendedTaglet) {
            tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
         }
         else {
            tagletString = taglet.toString(tagletTags);
         }
         if (null != tagletString) {
            output.printTagletString(tagletString);
         }
      }
   }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:43,代码来源:AbstractDoclet.java

示例4: printTaglets

import com.sun.javadoc.Doc; //导入方法依赖的package包/类
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
   for (Iterator<String> it = tagletMap.keySet().iterator(); it.hasNext(); ) {
      String tagName = it.next();
      Taglet taglet = tagletMap.get(tagName);
      Doc doc = context.getDoc();
      if (inline == taglet.isInlineTag()
          && ((doc == null
               && taglet.inOverview())
              || (doc != null
                  && ((doc.isConstructor() && taglet.inConstructor())
                      || (doc.isField() && taglet.inField())
                      || (doc.isMethod() && taglet.inMethod())
                      || (doc instanceof PackageDoc && taglet.inPackage())
                      || ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {

         List<Tag> tagsOfThisType = new LinkedList<Tag>();
         for (int i=0; i<tags.length; ++i) {
            if (tags[i].name().substring(1).equals(tagName)) {
               tagsOfThisType.add(tags[i]);
            }
         }

         Tag[] tagletTags = tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);

         String tagletString;
         if (taglet instanceof StandardTaglet) {
            tagletString = renderTag(tagName, tagletTags, context);
         }
         else if (taglet instanceof GnuExtendedTaglet) {
            tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
         }
         else {
            tagletString = taglet.toString(tagletTags);
         }
         if (null != tagletString) {
            output.printTagletString(tagletString);
         }
      }
   }
}
 
开发者ID:cfriedt,项目名称:classpath,代码行数:42,代码来源:AbstractDoclet.java


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