com.sun.source.doctree.ValueTree Java Examples
The following examples show how to use
com.sun.source.doctree.ValueTree.
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 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 #2
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); }
Example #3
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 #4
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 #5
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 #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: 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 #8
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 #9
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 #10
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 #11
Source File: TreeFactory.java From netbeans with Apache License 2.0 | 4 votes |
public ValueTree Value(ReferenceTree ref) { return docMake.at(NOPOS).newValueTree(ref); }
Example #12
Source File: RefactoringVisitor.java From netbeans with Apache License 2.0 | 4 votes |
/** * @since 1.47 */ @Override public DocTree visitValue(ValueTree node, Element p) { return docScanner.visitValue(node, p, null); }
Example #13
Source File: RefactoringVisitor.java From netbeans with Apache License 2.0 | 4 votes |
@Override public DocTree visitValue(ValueTree node, Element p) { return instance.visitValue(node, p); }
Example #14
Source File: RefactoringVisitor.java From netbeans with Apache License 2.0 | 4 votes |
public DocTree visitValue(ValueTree node, Element p, Void ignore) { return super.visitValue(node, p); }
Example #15
Source File: Analyzer.java From netbeans with Apache License 2.0 | 4 votes |
@Override public Void visitValue(ValueTree node, List<ErrorDescription> errors) { return super.visitValue(node, errors); }
Example #16
Source File: ImmutableDocTreeTranslator.java From netbeans with Apache License 2.0 | 4 votes |
@Override public DocTree visitValue(ValueTree tree, Object p) { return rewriteChildren(tree); }
Example #17
Source File: TreeMaker.java From netbeans with Apache License 2.0 | 2 votes |
/**Creates the DocTree's ValueTree. * * @param ref the value's reference * @return newly created ValueTree * @since 0.124 */ public ValueTree Value(ReferenceTree ref) { return delegate.Value(ref); }
Example #18
Source File: DocTreeFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * Create a new {@code ValueTree} object, to represent a {@code {@value } } tag. * @param ref a reference to the value * @return a {@code ValueTree} object */ ValueTree newValueTree(ReferenceTree ref);
Example #19
Source File: DocTreeFactory.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 2 votes |
/** * Create a new {@code ValueTree} object, to represent a {@code {@value } } tag. * @param ref a reference to the value * @return a {@code ValueTree} object */ ValueTree newValueTree(ReferenceTree ref);