コード例 #1
0
 @Override
 public boolean enterUnaryNode(final UnaryNode unaryNode) {
   if (unaryNode.isTokenType(TokenType.NOT) || unaryNode.isTokenType(TokenType.NEW)) {
     // Operand of boolean negation is never optimistic (always coerced to boolean).
     // Operand of "new" is never optimistic (always coerced to Object).
     tagNeverOptimistic(unaryNode.getExpression());
   }
   return true;
 }
コード例 #2
0
 @Override
 public boolean enterUnaryNode(final UnaryNode unaryNode) {
   if (unaryNode.isTokenType(TokenType.NEW)) {
     curExpr = new NewTreeImpl(unaryNode, translateExpr(unaryNode.getExpression()));
   } else {
     curExpr = new UnaryTreeImpl(unaryNode, translateExpr(unaryNode.getExpression()));
   }
   return false;
 }