com.sun.source.doctree.ProvidesTree Java Examples

The following examples show how to use com.sun.source.doctree.ProvidesTree. 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: ImmutableDocTreeTranslator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected final ProvidesTree rewriteChildren(ProvidesTree tree) {
    ProvidesTree value = tree;
    ReferenceTree name = (ReferenceTree) translate(tree.getServiceType());
    List<? extends DocTree> description = translateDoc(tree.getDescription());
    if (name != tree.getServiceType()|| description != tree.getDescription()) {
        value = make.Provides(name, description);
    }
    return value;
}
 
Example #2
Source File: VeryPretty.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitProvides(ProvidesTree node, Void p) {
    printTagName(node);
    needSpace();
    doAccept((DCTree)node.getServiceType());
    if (!node.getDescription().isEmpty()) {
        needSpace();
        for (DocTree docTree : node.getDescription()) {
            doAccept((DCTree)docTree);
        }
    }
    return null;
}
 
Example #3
Source File: Checker.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public Void visitProvides(ProvidesTree tree, Void ignore) {
    Element e = env.trees.getElement(env.currPath);
    if (e.getKind() != ElementKind.MODULE) {
        env.messages.error(REFERENCE, tree, "dc.invalid.provides");
    }
    ReferenceTree serviceType = tree.getServiceType();
    Element se = env.trees.getElement(new DocTreePath(getCurrentPath(), serviceType));
    if (se == null) {
        env.messages.error(REFERENCE, tree, "dc.service.not.found");
    }
    return super.visitProvides(tree, ignore);
}
 
Example #4
Source File: ImmutableDocTreeTranslator.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitProvides(ProvidesTree tree, Object p) {
    return rewriteChildren(tree);
}
 
Example #5
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/**
 * @since 1.62
 */
@Override
public DocTree visitProvides(ProvidesTree node, Element p) {
    return docScanner.visitProvides(node, p, null);
}
 
Example #6
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitProvides(ProvidesTree node, Element p) {
    return instance.visitProvides(node, p);
}
 
Example #7
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public DocTree visitProvides(ProvidesTree node, Element p, Void ignore) {
    return super.visitProvides(node, p);
}
 
Example #8
Source File: DocTreeFactory.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code ProvidesTree} object, to represent a {@code @provides } tag.
 * @param name the name of the service type
 * @param description a description of the service being provided
 * @return a {@code ProvidesTree} object
 */
ProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description);
 
Example #9
Source File: DocTreeFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new {@code ProvidesTree} object, to represent a {@code @provides } tag.
 * @param name the name of the service type
 * @param description a description of the service being provided
 * @return a {@code ProvidesTree} object
 */
ProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description);