Package lombok.ast

Examples of lombok.ast.UnaryOperator


    return true;
  }
 
  @Override
  public boolean visitUnaryExpression(UnaryExpression node) {
    UnaryOperator op;
    parensOpen(node);
   
    try {
      op = node.astOperator();
      if (op == null) throw new Exception();
    } catch (Exception e) {
      formatter.buildInline(node);
      visit(node.astOperand());
      formatter.closeInline();
      parensClose(node);
      return true;
    }
    formatter.buildInline(node);
    formatter.property("operator", op.getSymbol());
    formatter.property("postfix", op.isPostfix());
    if (!op.isPostfix()) formatter.operator(op.getSymbol());
    visit(node.astOperand());
    if (op.isPostfix()) formatter.operator(op.getSymbol());
    formatter.closeInline();
    parensClose(node);
    return true;
  }
View Full Code Here


    if (!opNode.getChildren().isEmpty() && "cast".equals(opNode.getChildren().get(0).getLabel())) {
      return posify(new Cast().rawOperand(operand).rawTypeReference(opNode.getValue()));
    } else {
      if (symbol != null) symbol = symbol.trim();
      if (!symbol.isEmpty()) {
        UnaryOperator op = UnaryOperator.fromSymbol(symbol, false);
        UnaryExpression expr = new UnaryExpression().rawOperand(operand);
        if (op != null) expr.astOperator(op);
        return posify(expr);
      }
    }
View Full Code Here

        String symbol = operatorTexts.get(i);
        if (symbol == null) continue;
        symbol = symbol.trim();
        if (symbol.isEmpty()) continue;
       
        UnaryOperator op = UnaryOperator.fromSymbol(symbol, false);
        UnaryExpression expr = new UnaryExpression().rawOperand(current);
        if (op != null) expr.astOperator(op);
        current = expr;
      }
     
View Full Code Here

TOP

Related Classes of lombok.ast.UnaryOperator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.