Skip to main content

Module expr

Module expr 

Source
Expand description

Expression types.

Structs§

ArrayAccessExpr
Array access expression: array[index].
ArrayDimExpr
A dimension expression in array creation: [expr].
ArrayInitExpr
Array initializer: {1, 2, 3}.
ArrayNewExpr
Array creation expression: new int[10] or new int[]{1, 2, 3}.
AssignExpr
Assignment expression: x = 5, x += 1.
BinaryExpr
Binary expression: a + b.
CastExpr
Type cast expression: (int) expr.
ConditionalExpr
Ternary conditional expression: cond ? a : b.
FieldAccessExpr
Field access expression: expr.field.
InstanceofExpr
instanceof expression: obj instanceof String or obj instanceof String s.
LambdaExpr
Lambda expression: x -> x + 1, (x, y) -> { return x + y; }.
LambdaParam
A lambda parameter with explicit type.
MethodCallExpr
Method invocation expression.
MethodRefExpr
Method reference expression: String::valueOf.
NewClassExpr
Class instance creation expression with optional body (anonymous class).
SwitchExpr
Switch expression (Java 14+): switch (x) { case 1 -> "one"; ... }.
UnaryExpr
Unary expression: -x, !flag, ++x.

Enums§

AssignTarget
The target of an assignment expression.
Expr
A Java expression.
InstanceofPattern
The right-hand side of an instanceof expression.
LambdaBody
Lambda body: either an expression or a block.
LambdaParams
Lambda parameters.
MethodRefTarget
The target of a method reference.
SwitchArm
A single arm of a switch expression.
SwitchCase
A case label in a switch.