com.sun.source.doctree.LiteralTree Java Examples

The following examples show how to use com.sun.source.doctree.LiteralTree. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: TencentKona-8   Author: Tencent   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #2
Source Project: jdk8u60   Author: chenghanpeng   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #3
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #4
Source Project: netbeans   Author: apache   File: ImmutableDocTreeTranslator.java    License: Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #5
Source Project: netbeans   Author: apache   File: VeryPretty.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Void visitLiteral(LiteralTree node, Void p) {
    print("{");
    printTagName(node);
    print(" ");
    doAccept((DCTree)node.getBody());
    print("}");
    return null;
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #7
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #8
Source Project: hottub   Author: dsrg-uoft   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #9
Source Project: openjdk-8-source   Author: keerath   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #10
Source Project: openjdk-8   Author: bpupadhyaya   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example #11
Source Project: j2objc   Author: google   File: JavadocConverter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Void visitLiteral(LiteralTree node, TagElement tag) {
  TagElement newTag = new TagElement();
  TagKind tagKind = node.getKind() == DocTree.Kind.CODE ? TagKind.CODE : TagKind.LITERAL;
  setTagValues(newTag, tagKind, node, node.getBody());
  tag.addFragment(newTag);
  return null;
}
 
Example #12
Source Project: netbeans   Author: apache   File: ImmutableDocTreeTranslator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLiteral(LiteralTree tree, Object p) {
    return rewriteChildren(tree);
}
 
Example #13
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @since 1.47
 */
@Override
public DocTree visitLiteral(LiteralTree node, Element p) {
    return docScanner.visitLiteral(node, p, null);
}
 
Example #14
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLiteral(LiteralTree node, Element p) {
    return instance.visitLiteral(node, p);
}
 
Example #15
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
public DocTree visitLiteral(LiteralTree node, Element p, Void ignore) {
    return super.visitLiteral(node, p);
}
 
Example #16
Source Project: netbeans   Author: apache   File: Analyzer.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Void visitLiteral(LiteralTree node, List<ErrorDescription> errors) {
    return super.visitLiteral(node, errors);
}
 
Example #17
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: JavadocFormatter.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public Object visitLiteral(LiteralTree node, Object p) {
    return scan(node.getBody(), p);
}
 
Example #18
Source Project: lua-for-android   Author: qtiuto   File: DocTreeFactory.java    License: BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code CodeTree} object, to represent a {@code {@code } } tag.
 * @param text the content of the tag
 * @return a {@code CodeTree} object
 */
LiteralTree newCodeTree(TextTree text);
 
Example #19
Source Project: lua-for-android   Author: qtiuto   File: DocTreeFactory.java    License: BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code LiteralTree} object, to represent a {@code {@literal } } tag.
 * @param text the content of the tag
 * @return a {@code LiteralTree} object
 */
LiteralTree newLiteralTree(TextTree text);
 
Example #20
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: DocTreeFactory.java    License: GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new {@code CodeTree} object, to represent a {@code {@code } } tag.
 * @param text the content of the tag
 * @return a {@code CodeTree} object
 */
LiteralTree newCodeTree(TextTree text);
 
Example #21
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: DocTreeFactory.java    License: GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new {@code LiteralTree} object, to represent a {@code {@literal } } tag.
 * @param text the content of the tag
 * @return a {@code LiteralTree} object
 */
LiteralTree newLiteralTree(TextTree text);