本文整理汇总了Java中com.sun.source.doctree.LinkTree类的典型用法代码示例。如果您正苦于以下问题:Java LinkTree类的具体用法?Java LinkTree怎么用?Java LinkTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LinkTree类属于com.sun.source.doctree包,在下文中一共展示了LinkTree类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: matchClass
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public Description matchClass(ClassTree tree, final VisitorState state) {
final DCTree.DCDocComment comment =
((JCTree.JCCompilationUnit) state.getPath().getCompilationUnit())
.docComments.getCommentTree((JCTree) tree);
if (comment == null) {
return Description.NO_MATCH;
}
final SuggestedFix.Builder fix = SuggestedFix.builder();
new DocTreePathScanner<Void, Void>() {
@Override
public Void visitLink(LinkTree node, Void aVoid) {
SuggestedFixes.qualifyDocReference(
fix, new DocTreePath(getCurrentPath(), node.getReference()), state);
return null;
}
}.scan(new DocTreePath(state.getPath(), comment), null);
if (fix.isEmpty()) {
return Description.NO_MATCH;
}
return describeMatch(tree, fix.build());
}
开发者ID:google,项目名称:error-prone,代码行数:23,代码来源:SuggestedFixesTest.java
示例2: rewriteChildren
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
protected final LinkTree rewriteChildren(LinkTree tree) {
LinkTree value = tree;
List<? extends DocTree> label = translateDoc(tree.getLabel());
ReferenceTree ref = (ReferenceTree) translate(tree.getReference());
if (label != tree.getLabel() || ref != tree.getReference()) {
value = make.Link(ref, label);
}
return value;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:ImmutableDocTreeTranslator.java
示例3: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public Void visitLink(LinkTree node, Void p) {
print("{");
printTagName(node);
print(" ");
doAccept((DCTree)node.getReference());
if (!node.getLabel().isEmpty()) {
print(" ");
for (DocTree docTree : node.getLabel()) {
doAccept((DCTree)docTree);
}
}
print("}");
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:VeryPretty.java
示例4: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public Void visitLink(LinkTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
// simulate inline context on tag stack
HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
? HtmlTag.CODE : HtmlTag.SPAN;
tagStack.push(new TagStackItem(tree, t));
try {
return super.visitLink(tree, ignore);
} finally {
tagStack.pop();
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:Checker.java
示例5: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public Object visitLink(LinkTree node, Object p) {
if (!node.getLabel().isEmpty()) {
scan(node.getLabel(), p);
} else {
result.append(node.getReference().getSignature());
}
return null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:JavadocFormatter.java
示例6: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public Void visitLink(LinkTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
// simulate inline context on tag stack
HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
? HtmlTag.CODE : HtmlTag.SPAN;
tagStack.push(new TagStackItem(tree, t));
try {
return super.visitLink(tree, ignore);
} finally {
tagStack.pop();
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Checker.java
示例7: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public DocTree visitLink(LinkTree tree, Object p) {
return rewriteChildren(tree);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ImmutableDocTreeTranslator.java
示例8: Link
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
public LinkTree Link(ReferenceTree ref, List<? extends DocTree> label) {
return docMake.at(NOPOS).newLinkTree(ref, label);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:TreeFactory.java
示例9: LinkPlain
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
public LinkTree LinkPlain(ReferenceTree ref, List<? extends DocTree> label) {
return docMake.at(NOPOS).newLinkPlainTree(ref, label);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:TreeFactory.java
示例10: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
/**
* @since 1.47
*/
@Override
public DocTree visitLink(LinkTree node, Element p) {
return docScanner.visitLink(node, p, null);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:RefactoringVisitor.java
示例11: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public Void visitLink(LinkTree node, List<ErrorDescription> errors) {
return super.visitLink(node, errors);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:Analyzer.java
示例12: visitLink
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
@Override
public Void visitLink(LinkTree tree, Void ignore) {
checkReference(tree.getReference(), tree.getLabel());
return null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:ReferenceTest.java
示例13: Link
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
/**Creates the DocTree's LinkTree.
*
* @param ref the reference linked by the {@code @link}
* @param label the optional description of the reference
* @return newly created LinkTree
* @since 0.124
*/
public LinkTree Link(ReferenceTree ref, List<? extends DocTree> label) {
return delegate.Link(ref, label);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:TreeMaker.java
示例14: LinkPlain
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
/**Creates the DocTree's LinkTree for {@code @linkplain}.
*
* @param ref the reference linked by the {@code @link}
* @param label the optional description of the reference
* @return newly created LinkTree
* @since 0.124
*/
public LinkTree LinkPlain(ReferenceTree ref, List<? extends DocTree> label) {
return delegate.LinkPlain(ref, label);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:TreeMaker.java
示例15: newLinkTree
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
/**
* Create a new {@code LinkTree} object, to represent a {@code {@link } } tag.
* @param ref the API element being referenced
* @param label an optional label for the link
* @return a {@code LinkTree} object
*/
LinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label);
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:DocTreeFactory.java
示例16: newLinkPlainTree
import com.sun.source.doctree.LinkTree; //导入依赖的package包/类
/**
* Create a new {@code LinkPlainTree} object, to represent a {@code {@linkplain } } tag.
* @param ref the API element being referenced
* @param label an optional label for the link
* @return a {@code LinkPlainTree} object
*/
LinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label);
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:DocTreeFactory.java
注:本文中的com.sun.source.doctree.LinkTree类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论