Java Code Examples for com.sun.source.doctree.ReferenceTree#getSignature()
The following examples show how to use
com.sun.source.doctree.ReferenceTree#getSignature() .
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 File: ReferenceTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 2
Source File: ReferenceTest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 3
Source File: ReferenceTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 4
Source File: ReferenceTest.java From hottub with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 5
Source File: ReferenceTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 6
Source File: ReferenceTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 7
Source File: ReferenceTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 8
Source File: ReferenceTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
void checkReference(ReferenceTree tree, List<? extends DocTree> label) { String sig = tree.getSignature(); Element found = trees.getElement(new DocTreePath(getCurrentPath(), tree)); if (found == null) { System.err.println(sig + " NOT FOUND"); } else { System.err.println(sig + " found " + found.getKind() + " " + found); } String expect = "UNKNOWN"; if (label.size() > 0 && label.get(0) instanceof TextTree) expect = ((TextTree) label.get(0)).getBody(); if (!expect.equalsIgnoreCase(found == null ? "bad" : found.getKind().name())) { error(tree, "Unexpected value found: " + found +", expected: " + expect); } }
Example 9
Source File: ElementJavadoc.java From netbeans with Apache License 2.0 | 5 votes |
private void appendReference(StringBuilder sb, ReferenceTree ref, List<? extends DocTree> label, TreePath docPath, DocCommentTree doc, DocTrees trees) { String sig = ref.getSignature(); if (sig != null && sig.length() > 0) { if (sig.charAt(0) == '#') { //NOI18N sig = sig.substring(1); } sig = sig.replace('#', '.'); //NOI18N } Element element = trees.getElement(DocTreePath.getPath(docPath, doc, ref)); if (element != null) { createLink(sb, element, label == null || label.isEmpty() ? sig : inlineTags(label, docPath, doc, trees, null)); //NOI18N } else { sb.append(label == null || label.isEmpty() ? sig : inlineTags(label, docPath, doc, trees, null)); } }
Example 10
Source File: Checker.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 11
Source File: Checker.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 12
Source File: Checker.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override @DefinedBy(Api.COMPILER_TREE) public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 13
Source File: Checker.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 14
Source File: Checker.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 15
Source File: Checker.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 16
Source File: Checker.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }
Example 17
Source File: Checker.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitReference(ReferenceTree tree, Void ignore) { String sig = tree.getSignature(); if (sig.contains("<") || sig.contains(">")) env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed"); Element e = env.trees.getElement(getCurrentPath()); if (e == null) env.messages.error(REFERENCE, tree, "dc.ref.not.found"); return super.visitReference(tree, ignore); }