MCPcopy Create free account
hub / github.com/evant/android-retrolambda-lombok / Expression

Interface Expression

src/main/lombok/ast/Expression.java:26–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24import java.util.List;
25
26public interface Expression extends Node, AnnotationValue {
27 /**
28 * Returns the actual amount of parentheses physically around this expression.
29 *
30 * @see #astParensPositions()
31 * @see #getIntendedParens()
32 */
33 int getParens();
34
35 /**
36 * Returns the same value as {@link #getParens()}, <i>unless</i> that method returns {@code 0},
37 * and {@link #needsParentheses()} is {@code true}, then this method returns {@code 1}.
38 */
39 int getIntendedParens();
40
41 /**
42 * Returns the start/end position of each paren pair around this node. The only canonical aspect
43 * of this list is the size of it. The positions are set to appropriate files after parsing, from
44 * the innermost parens at index 0 to the outermost at the final index.
45 *
46 * @see #getParens()
47 */
48 List<Position> astParensPositions();
49
50 /**
51 * Returns {@code true} if the expression would need parentheses because without them the interpretation
52 * of this node would be different, due to operator precedence rules.
53 *
54 * @see #getIntendedParens()
55 */
56 boolean needsParentheses();
57
58 /**
59 * Returns true if the given expression is a valid statement expression.
60 * Statement expressions can be executed as statements simply by appending a semicolon to them.
61 */
62 boolean isStatementExpression();
63}

Callers 17

visitUnaryExpressionMethod · 0.65
visitBinaryExpressionMethod · 0.65
tryStringCombineMethod · 0.65
containedInUnaryMinusMethod · 0.65
getIntendedParensMethod · 0.65
setMethod · 0.65
parensOpenMethod · 0.65
parensCloseMethod · 0.65
setMethod · 0.65
visitParensMethod · 0.95
testMinValueMethod · 0.65
posParenMethod · 0.65

Implementers 4

WithParenssrc/main/lombok/ast/AbstractNode.java
NullLiteralsrc/main/lombok/ast/NullLiteral.java
IntegralLiteralsrc/main/lombok/ast/IntegralLiteral.ja
FloatingPointLiteralsrc/main/lombok/ast/FloatingPointLiter

Calls

no outgoing calls

Tested by

no test coverage detected