本文整理汇总了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());
}
}
示例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());
}
}
示例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;
}
示例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;
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}