• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java GnuExtendedTaglet类的典型用法和代码示例

java 1次浏览

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

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

示例1: printInlineTaglet

点赞 3

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的package包/类
protected void printInlineTaglet(Tag tag, TagletContext context, TagletPrinter output)
{
   Taglet taglet = (Taglet)tagletMap.get(tag.name().substring(1));
   if (null != taglet) {
      String tagletString;
      if (taglet instanceof GnuExtendedTaglet) {
         tagletString = ((GnuExtendedTaglet)taglet).toString(tag, context);
      }
      else {
         tagletString = taglet.toString(tag);
      }
      if (null != tagletString) {
         output.printTagletString(tagletString);
      }
   }
   else {
      printWarning("Unknown tag: " + tag.name());
   }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:20,
代码来源:AbstractDoclet.java

示例2: printInlineTaglet

点赞 3

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的package包/类
protected void printInlineTaglet(Tag tag, TagletContext context, TagletPrinter output) 
{
   Taglet taglet = (Taglet)tagletMap.get(tag.name().substring(1));
   if (null != taglet) {
      String tagletString;
      if (taglet instanceof GnuExtendedTaglet) {
         tagletString = ((GnuExtendedTaglet)taglet).toString(tag, context);
      }
      else {
         tagletString = taglet.toString(tag);
      }
      if (null != tagletString) {
         output.printTagletString(tagletString);
      }
   }
   else {
      printWarning("Unknown tag: " + tag.name());
   }
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:20,
代码来源:AbstractDoclet.java

示例3: printTaglets

点赞 2

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的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: renderInlineTags

点赞 2

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的package包/类
public String renderInlineTags(Tag[] tags, TagletContext context)
{
   StringBuffer result = new StringBuffer();

   HtmlRepairer repairer = new HtmlRepairer(getRootDoc(),
                                            true, false,
                                            null, null,
                                            true);

   for (int i=0; i<tags.length; ++i) {

      Tag tag = tags[i];

      if ("Text".equals(tag.name())) {
         result.append(repairer.getWellformedHTML(tag.text()));
      }
      else if ("@link".equals(tag.name())) {
         result.append(renderSeeTag((SeeTag)tag, context, false));
      }
      else if ("@linkplain".equals(tag.name())) {
         result.append(renderSeeTag((SeeTag)tag, context, true));
      }
      else if ("@docRoot".equals(tag.name())) {
         result.append(((HtmlTagletContext)context).getOutput().getPathToRoot());
      }
      else {
         //TagletContext context = TagletContext.OVERVIEW; // FIXME
         Taglet taglet = (Taglet)tagletMap.get(tag.name().substring(1));
         if (null != taglet) {
            if (taglet instanceof GnuExtendedTaglet) {
               result.append(((GnuExtendedTaglet)taglet).toString(tag, context));
            }
            else {
               result.append(taglet.toString(tag));
            }
         }
      }
   }
   result.append(repairer.terminateText());
   return result.toString();
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:42,
代码来源:HtmlDoclet.java

示例5: printTaglets

点赞 2

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的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

示例6: renderInlineTags

点赞 2

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的package包/类
public String renderInlineTags(Tag[] tags, TagletContext context)
{
   StringBuffer result = new StringBuffer();

   HtmlRepairer repairer = new HtmlRepairer(getRootDoc(), 
                                            true, false,
                                            null, null,
                                            true);

   for (int i=0; i<tags.length; ++i) {

      Tag tag = tags[i];

      if ("Text".equals(tag.name())) {
         result.append(repairer.getWellformedHTML(tag.text()));
      }
      else if ("@link".equals(tag.name())) {
         result.append(renderSeeTag((SeeTag)tag, context, false));
      }
      else if ("@linkplain".equals(tag.name())) {
         result.append(renderSeeTag((SeeTag)tag, context, true));
      }
      else if ("@docRoot".equals(tag.name())) {         
         result.append(((HtmlTagletContext)context).getOutput().getPathToRoot());
      }
      else {
         //TagletContext context = TagletContext.OVERVIEW; // FIXME
         Taglet taglet = (Taglet)tagletMap.get(tag.name().substring(1));
         if (null != taglet) {
            if (taglet instanceof GnuExtendedTaglet) {
               result.append(((GnuExtendedTaglet)taglet).toString(tag, context));
            }
            else {
               result.append(taglet.toString(tag));
            }
         }
      }
   }
   result.append(repairer.terminateText());
   return result.toString();
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:42,
代码来源:HtmlDoclet.java

示例7: printTaglets

点赞 2

import gnu.classpath.tools.taglets.GnuExtendedTaglet; //导入依赖的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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)