com.sun.source.tree.ProvidesTree Java Examples

The following examples show how to use com.sun.source.tree.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: TreeDuplicator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Tree visitProvides(ProvidesTree tree, Void p) {
    ProvidesTree n = make.Provides(tree.getServiceName(), tree.getImplementationNames());
    model.setType(n, model.getType(tree));
    comments.copyComments(tree, n);
    model.setPos(n, model.getPos(tree));
    return n;
}
 
Example #2
Source File: SemanticHighlighterBase.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitProvides(ProvidesTree tree, Void p) {
    tl.moveToOffset(sourcePositions.getStartPosition(info.getCompilationUnit(), tree));
    Token t = firstIdentifierToken("provides"); //NOI18N
    if (t != null) {
        contextKeywords.add(t);
    }
    scan(tree.getServiceName(), p);
    tl.moveToOffset(sourcePositions.getEndPosition(info.getCompilationUnit(), tree.getServiceName()));
    t = firstIdentifierToken("with"); //NOI18N
    if (t != null) {
        contextKeywords.add(t);
    }
    return scan(tree.getImplementationNames(), p);
}
 
Example #3
Source File: TreeNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitProvides(ProvidesTree tree, List<Node> d) {
    List<Node> below = new ArrayList<Node>();
    
    addCorrespondingType(below);
    addCorrespondingComments(below);
    super.visitProvides(tree, below);
    
    d.add(new TreeNode(info, getCurrentPath(), below));
    return null;
}
 
Example #4
Source File: ExpectedTypeResolver.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public List<? extends TypeMirror> visitProvides(ProvidesTree node, Object p) {
    return null;
}
 
Example #5
Source File: CanInterpretVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Boolean visitProvides(ProvidesTree node, EvaluationContext p) {
    return Boolean.FALSE;
}
 
Example #6
Source File: JavacModuleParser.java    From pro with GNU General Public License v3.0 4 votes vote down vote up
public void visitProvides(ProvidesTree node, @SuppressWarnings("unused") TreeVisitor<?, ?> __) {
  mv.visitProvide(qualifiedString(node.getServiceName()), toArray(node.getImplementationNames()));
}
 
Example #7
Source File: JavaInputAstVisitor.java    From google-java-format with Apache License 2.0 4 votes vote down vote up
@Override
public Void visitProvides(ProvidesTree node, Void unused) {
  visitDirective("provides", "with", node.getServiceName(), node.getImplementationNames());
  return null;
}