本文整理汇总了Java中com.sun.source.doctree.LiteralTree.getKind方法的典型用法代码示例。如果您正苦于以下问题:Java LiteralTree.getKind方法的具体用法?Java LiteralTree.getKind怎么用?Java LiteralTree.getKind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.source.doctree.LiteralTree
的用法示例。
在下文中一共展示了LiteralTree.getKind方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rewriteChildren
import com.sun.source.doctree.LiteralTree; //导入方法依赖的package包/类
protected final LiteralTree rewriteChildren(LiteralTree tree) {
LiteralTree value = tree;
TextTree body = (TextTree) translate(tree.getBody());
if (body != tree.getBody()) {
if(tree.getKind() == DocTree.Kind.CODE) {
value = make.Code(body);
} else {
value = make.Literal(body);
}
}
return value;
}
示例2: visitLiteral
import com.sun.source.doctree.LiteralTree; //导入方法依赖的package包/类
@Override
public Void visitLiteral(LiteralTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
if (tree.getKind() == DocTree.Kind.CODE) {
for (TagStackItem tsi: tagStack) {
if (tsi.tag == HtmlTag.CODE) {
env.messages.warning(HTML, tree, "dc.tag.code.within.code");
break;
}
}
}
return super.visitLiteral(tree, ignore);
}
示例3: visitLiteral
import com.sun.source.doctree.LiteralTree; //导入方法依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public Void visitLiteral(LiteralTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
if (tree.getKind() == DocTree.Kind.CODE) {
for (TagStackItem tsi: tagStack) {
if (tsi.tag == HtmlTag.CODE) {
env.messages.warning(HTML, tree, "dc.tag.code.within.code");
break;
}
}
}
return super.visitLiteral(tree, ignore);
}