@Test public void test_logical_binary_operation() { Tree binaryAnd = new BinaryExpressionTreeImpl(null, CONDITIONAL_AND, null, TRUE_LITERAL, FALSE_LITERAL); Tree binaryOr = new BinaryExpressionTreeImpl(null, CONDITIONAL_OR, null, TRUE_LITERAL, FALSE_LITERAL); Tree binaryEqual = new BinaryExpressionTreeImpl(null, EQUAL_TO, null, TRUE_LITERAL, FALSE_LITERAL); assertThat(isLogicalBinaryExpression(binaryAnd)).isTrue(); assertThat(isLogicalBinaryExpression(binaryOr)).isTrue(); assertThat(isLogicalBinaryExpression(binaryEqual)).isFalse(); assertThat(isLogicalBinaryExpression(TRUE_NEGATED)).isFalse(); }
public static boolean isLogicalBinaryExpression(Tree tree) { return isBinaryOperation(tree, CONDITIONAL_AND) || isBinaryOperation(tree, CONDITIONAL_OR); }
ExpressionUtils { public static boolean isLogicalBinaryExpression(Tree tree) { return isBinaryOperation(tree, CONDITIONAL_AND) || isBinaryOperation(tree, CONDITIONAL_OR); } }
ExpressionUtils { public static boolean isLogicalBinaryExpression(Tree tree) { return isBinaryOperation(tree, CONDITIONAL_AND) || isBinaryOperation(tree, CONDITIONAL_OR); } private  ExpressionUtils(); }
ExpressionUtils { public static boolean isLogicalBinaryExpression(Tree tree) { return isBinaryOperation(tree, CONDITIONAL_AND) || isBinaryOperation(tree, CONDITIONAL_OR); } private  ExpressionUtils(); static boolean isBooleanLiteral(Tree tree); static boolean isFalseValueLiteral(Tree originalTree); static boolean isTrueValueLiteral(Tree originalTree); static boolean isNegation(Tree tree); static boolean isBinaryOperation(Tree tree, BinaryExpressionTree.Operator operator); static boolean isLogicalBinaryExpression(Tree tree); static Tree skipParentheses(Tree tree); static boolean containsPlaceHolder(Tree tree); static boolean isTernaryOperator(Deque<Tree> ancestors, Tree tree); static Optional<String> getMemberSelectOrIdentifierName(Tree tree); }
ExpressionUtils { public static boolean isLogicalBinaryExpression(Tree tree) { return isBinaryOperation(tree, CONDITIONAL_AND) || isBinaryOperation(tree, CONDITIONAL_OR); } private  ExpressionUtils(); static boolean isBooleanLiteral(Tree tree); static boolean isFalseValueLiteral(Tree originalTree); static boolean isTrueValueLiteral(Tree originalTree); static boolean isNegation(Tree tree); static boolean isBinaryOperation(Tree tree, BinaryExpressionTree.Operator operator); static boolean isLogicalBinaryExpression(Tree tree); static Tree skipParentheses(Tree tree); static boolean containsPlaceHolder(Tree tree); static boolean isTernaryOperator(Deque<Tree> ancestors, Tree tree); static Optional<String> getMemberSelectOrIdentifierName(Tree tree);  }