當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。