@Test public void test_true_literal_value() { assertThat(isTrueValueLiteral(TRUE_LITERAL)).isTrue(); assertThat(isTrueValueLiteral(FALSE_LITERAL)).isFalse(); assertThat(isTrueValueLiteral(NUMBER_LITERAL)).isFalse(); assertThat(isTrueValueLiteral(TRUE_NEGATED)).isFalse(); assertThat(isTrueValueLiteral(FALSE_NEGATED)).isTrue(); }
public static boolean isTrueValueLiteral(Tree originalTree) { Tree tree = skipParentheses(originalTree); return (tree instanceof LiteralTree && TRUE_LITERAL.equals(((LiteralTree) tree).value())) || (isNegation(tree) && isFalseValueLiteral(((UnaryExpressionTree) tree).operand())); }
ExpressionUtils { public static boolean isTrueValueLiteral(Tree originalTree) { Tree tree = skipParentheses(originalTree); return (tree instanceof LiteralTree && TRUE_LITERAL.equals(((LiteralTree) tree).value())) || (isNegation(tree) && isFalseValueLiteral(((UnaryExpressionTree) tree).operand())); } }
ExpressionUtils { public static boolean isTrueValueLiteral(Tree originalTree) { Tree tree = skipParentheses(originalTree); return (tree instanceof LiteralTree && TRUE_LITERAL.equals(((LiteralTree) tree).value())) || (isNegation(tree) && isFalseValueLiteral(((UnaryExpressionTree) tree).operand())); } private  ExpressionUtils(); }
ExpressionUtils { public static boolean isTrueValueLiteral(Tree originalTree) { Tree tree = skipParentheses(originalTree); return (tree instanceof LiteralTree && TRUE_LITERAL.equals(((LiteralTree) tree).value())) || (isNegation(tree) && isFalseValueLiteral(((UnaryExpressionTree) tree).operand())); } 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 isTrueValueLiteral(Tree originalTree) { Tree tree = skipParentheses(originalTree); return (tree instanceof LiteralTree && TRUE_LITERAL.equals(((LiteralTree) tree).value())) || (isNegation(tree) && isFalseValueLiteral(((UnaryExpressionTree) tree).operand())); } 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);  }