Java Code Examples for com.sun.source.doctree.ValueTree#getReference()
The following examples show how to use
com.sun.source.doctree.ValueTree#getReference() .
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: Checker.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 2
Source File: Checker.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 3
Source File: Checker.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 4
Source File: ImmutableDocTreeTranslator.java From netbeans with Apache License 2.0 | 5 votes |
protected final ValueTree rewriteChildren(ValueTree tree) { ValueTree value = tree; ReferenceTree reference = (ReferenceTree) translate(tree.getReference()); if (reference != tree.getReference()) { value = make.Value(reference); } return value; }
Example 5
Source File: VeryPretty.java From netbeans with Apache License 2.0 | 5 votes |
@Override public Void visitValue(ValueTree node, Void p) { print("{"); printTagName(node); if (node.getReference() != null) { print(" "); print((DCTree)node.getReference()); } print("}"); return null; }
Example 6
Source File: Checker.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 7
Source File: Checker.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override @DefinedBy(Api.COMPILER_TREE) public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 8
Source File: Checker.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 9
Source File: Checker.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }
Example 10
Source File: Checker.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public Void visitValue(ValueTree tree, Void ignore) { ReferenceTree ref = tree.getReference(); if (ref == null || ref.getSignature().isEmpty()) { if (!isConstant(env.currElement)) env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here"); } else { Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref)); if (!isConstant(e)) env.messages.error(REFERENCE, tree, "dc.value.not.a.constant"); } markEnclosingTag(Flag.HAS_INLINE_TAG); return super.visitValue(tree, ignore); }