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


Java Taglet类代码示例

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


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

示例1: printInlineTaglet

import com.sun.tools.doclets.Taglet; //导入依赖的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

import com.sun.tools.doclets.Taglet; //导入依赖的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: toStandardTags

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Transforms common tags on the Doc object into XML.
 *
 * @param doc The Doc object.
 * @return The corresponding list of nodes.
 */
private static List<XMLNode> toStandardTags(Doc doc) {
  // Create the comment node
  List<XMLNode> nodes = new ArrayList<XMLNode>();

  // Handle the tags
  for (Tag tag : doc.tags()) {
    Taglet taglet = options.getTagletForName(tag.name().length() > 1? tag.name().substring(1) : "");
    if (taglet instanceof BlockTag) {
      nodes.add(((BlockTag) taglet).toXMLNode(tag));
    }
  }

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

示例4: toTags

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Transforms comments on the Doc object into XML.
 *
 * @param doc The Doc object.
 * @param node The node to add the comment nodes to.
 */
private static XMLNode toTags(Doc doc) {
  // Create the comment node
  XMLNode node = new XMLNode("tags");

  boolean hasTags = false;

  // Handle the tags
  for (Tag tag : doc.tags()) {
    Taglet taglet = options.getTagletForName(tag.name().length() > 1? tag.name().substring(1) : "");
    if (taglet != null && !(taglet instanceof BlockTag)) {
      XMLNode tNode = new XMLNode("tag");
      tNode.attribute("name", tag.name());
      tNode.text(taglet.toString(tag));
      node.child(tNode);
      hasTags = true;
    }
  }

  // Add the node to the host
  return hasTags? node : null;
}
 
开发者ID:pageseeder,项目名称:xmldoclet,代码行数:28,代码来源:XMLDoclet.java

示例5: toComment

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Transforms comments on the Doc object into XML.
 *
 * @param doc The Doc object.
 * @param node The node to add the comment nodes to.
 */
private static XMLNode toComment(Doc doc) {
  if (doc.commentText() == null || doc.commentText().length() == 0) return null;
  XMLNode node = new XMLNode("comment", doc, doc.position().line());
  StringBuilder comment = new StringBuilder();

  // Analyse each token and produce comment node
  for (Tag t : doc.inlineTags()) {
    Taglet taglet = options.getTagletForName(t.name());
    if (taglet != null) {
      comment.append(taglet.toString(t));
    } else {
      comment.append(t.text());
    }
  }

  return node.text(comment.toString());
}
 
开发者ID:pageseeder,项目名称:xmldoclet,代码行数:24,代码来源:XMLDoclet.java

示例6: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRMqProducerTaglet tag = new WRMqProducerTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRMqProducerTaglet.java

示例7: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRParamTaglet tag = new WRParamTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRParamTaglet.java

示例8: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRMqConsumerTaglet tag = new WRMqConsumerTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRMqConsumerTaglet.java

示例9: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRRefReqTaglet tag = new WRRefReqTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRRefReqTaglet.java

示例10: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRRefRespTaglet tag = new WRRefRespTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRRefRespTaglet.java

示例11: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
    * Register this Taglet.
    * @param tagletMap  the map to register this tag to.
    */
   @SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
      WRTagTaglet tag = new WRTagTaglet();
      Taglet t = (Taglet) tagletMap.get(tag.getName());
      if (t != null) {
          tagletMap.remove(tag.getName());
      }
      tagletMap.put(tag.getName(), tag);
   }
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:14,代码来源:WRMemoTaglet.java

示例12: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRAPITaglet tag = new WRAPITaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRAPITaglet.java

示例13: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRReturnTaglet tag = new WRReturnTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRReturnTaglet.java

示例14: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * 
 * @param tagletMap
 *            the map to register this tag to.
 */
@SuppressWarnings("unchecked")
public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
	WRTagTaglet tag = new WRTagTaglet();
	Taglet t = (Taglet) tagletMap.get(tag.getName());
	if (t != null) {
		tagletMap.remove(tag.getName());
	}
	tagletMap.put(tag.getName(), tag);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:16,代码来源:WRTagTaglet.java

示例15: register

import com.sun.tools.doclets.Taglet; //导入依赖的package包/类
/**
 * Register this Taglet.
 * @param tagletMap  the map to register this tag to.
 */
public static void register(Map tagletMap) {
   ExampleTaglet tag = new ExampleTaglet();
   Taglet t = (Taglet) tagletMap.get(tag.getName());
   if (t != null) {
       tagletMap.remove(tag.getName());
   }
   tagletMap.put(tag.getName(), tag);
}
 
开发者ID:garciadelcastillo,项目名称:-dashed-lines-for-processing-,代码行数:13,代码来源:ExampleTaglet.java


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