Expand description
Expression types.
Structs§
- Array
Access Expr - Array access expression:
array[index]. - Array
DimExpr - A dimension expression in array creation:
[expr]. - Array
Init Expr - Array initializer:
{1, 2, 3}. - Array
NewExpr - Array creation expression:
new int[10]ornew int[]{1, 2, 3}. - Assign
Expr - Assignment expression:
x = 5,x += 1. - Binary
Expr - Binary expression:
a + b. - Cast
Expr - Type cast expression:
(int) expr. - Conditional
Expr - Ternary conditional expression:
cond ? a : b. - Field
Access Expr - Field access expression:
expr.field. - Instanceof
Expr - instanceof expression:
obj instanceof Stringorobj instanceof String s. - Lambda
Expr - Lambda expression:
x -> x + 1,(x, y) -> { return x + y; }. - Lambda
Param - A lambda parameter with explicit type.
- Method
Call Expr - Method invocation expression.
- Method
RefExpr - Method reference expression:
String::valueOf. - NewClass
Expr - Class instance creation expression with optional body (anonymous class).
- Switch
Expr - Switch expression (Java 14+):
switch (x) { case 1 -> "one"; ... }. - Unary
Expr - Unary expression:
-x,!flag,++x.
Enums§
- Assign
Target - The target of an assignment expression.
- Expr
- A Java expression.
- Instanceof
Pattern - The right-hand side of an instanceof expression.
- Lambda
Body - Lambda body: either an expression or a block.
- Lambda
Params - Lambda parameters.
- Method
RefTarget - The target of a method reference.
- Switch
Arm - A single arm of a switch expression.
- Switch
Case - A case label in a switch.