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


Java Doc.isMethod方法代碼示例

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


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

示例1: log

import com.sun.javadoc.Doc; //導入方法依賴的package包/類
private void log(Doc doc) {
    final String type;
    if (doc.isInterface()) {
        type = "interface";
    } else if (doc.isEnum()) {
        type = "enumeration";
    } else if (doc.isMethod()) {
        type = "method";
    } else if (doc.isEnumConstant()) {
        type = "constant";
    } else {
        type = "type";
    }
    root.printNotice("Constructing documentation for " + type + " " + doc.name());
}
 
開發者ID:voostindie,項目名稱:markdoclet,代碼行數:16,代碼來源:JavadocToDocumentConverter.java

示例2: 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

示例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:vilie,項目名稱:javify,代碼行數:43,代碼來源:AbstractDoclet.java

示例4: 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

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