Java Code Examples for com.sun.source.tree.ContinueTree#getLabel()

The following examples show how to use com.sun.source.tree.ContinueTree#getLabel() . 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: JavaInputAstVisitor.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitContinue(ContinueTree node, Void unused) {
    sync(node);
    builder.open(plusFour);
    token("continue");
    if (node.getLabel() != null) {
        builder.breakOp(" ");
        visit(node.getLabel());
    }
    token(";");
    builder.close();
    return null;
}
 
Example 2
Source File: PreconditionsChecker.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Tree visitContinue(ContinueTree that, Trees trees) {
    if (that.getLabel() != null || !isIfWithContinueOnly(that)) {
        this.hasContinue = true;
    }
    return super.visitContinue(that, trees);
}
 
Example 3
Source File: JavaInputAstVisitor.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Void visitContinue(ContinueTree node, Void unused) {
    sync(node);
    builder.open(plusFour);
    token("continue");
    if (node.getLabel() != null) {
        builder.breakOp(" ");
        visit(node.getLabel());
    }
    token(";");
    builder.close();
    return null;
}
 
Example 4
Source File: JavaInputAstVisitor.java    From google-java-format with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitContinue(ContinueTree node, Void unused) {
  sync(node);
  builder.open(plusFour);
  token("continue");
  if (node.getLabel() != null) {
    builder.breakOp(" ");
    visit(node.getLabel());
  }
  token(";");
  builder.close();
  return null;
}
 
Example 5
Source File: TreeConverter.java    From j2objc with Apache License 2.0 5 votes vote down vote up
private TreeNode convertContinueStatement(ContinueTree node) {
  ContinueStatement newNode = new ContinueStatement();
  Object label = node.getLabel();
  if (label != null) {
    newNode.setLabel(
        (SimpleName) new SimpleName(label.toString()).setPosition(getPosition(node)));
  }
  return newNode;
}