Package | Description |
---|---|
com.github.javaparser.ast.expr |
Modifier and Type | Class and Description |
---|---|
class |
RecordPatternExpr
Record Patterns
Record patterns were officially added in Java 21 to allow the deconstruction of
record values and provide convenient access to inner fields through pattern matching.
|
class |
TypePatternExpr
The instanceof statement
Java 1.0 to 13
Not available.
|
Modifier and Type | Method and Description |
---|---|
PatternExpr |
PatternExpr.asPatternExpr() |
PatternExpr |
Expression.asPatternExpr() |
PatternExpr |
PatternExpr.clone() |
PatternExpr |
PatternExpr.setType(Type type) |
Modifier and Type | Method and Description |
---|---|
Optional<PatternExpr> |
InstanceOfExpr.getPattern() |
NodeList<PatternExpr> |
RecordPatternExpr.getPatternList() |
Optional<PatternExpr> |
PatternExpr.toPatternExpr() |
Optional<PatternExpr> |
Expression.toPatternExpr() |
Modifier and Type | Method and Description |
---|---|
InstanceOfExpr |
InstanceOfExpr.setPattern(PatternExpr pattern) |
Modifier and Type | Method and Description |
---|---|
void |
PatternExpr.ifPatternExpr(Consumer<PatternExpr> action) |
void |
Expression.ifPatternExpr(Consumer<PatternExpr> action) |
RecordPatternExpr |
RecordPatternExpr.setPatternList(NodeList<PatternExpr> patternList) |
Constructor and Description |
---|
InstanceOfExpr(Expression expression,
ReferenceType type,
PatternExpr pattern) |
InstanceOfExpr(TokenRange tokenRange,
Expression expression,
ReferenceType type,
PatternExpr pattern)
This constructor is used by the parser and is considered private.
|
Constructor and Description |
---|
RecordPatternExpr(NodeList<Modifier> modifiers,
Type type,
NodeList<PatternExpr> patternList) |
RecordPatternExpr(TokenRange tokenRange,
NodeList<Modifier> modifiers,
Type type,
NodeList<PatternExpr> patternList)
This constructor is used by the parser and is considered private.
|
Copyright © 2007–2024. All rights reserved.