@CompileStatic
@Immutable(knownImmutableClasses=[ConstraintPredicate])
class MatchingConstraints
extends Object
Represents constraints in AST pattern matching.
| Modifiers | Name | Description |
|---|---|---|
static ConstraintPredicate<Token> |
ANY_TOKEN |
Predicate that matches any token. |
| Type | Name and description |
|---|---|
ConstraintPredicate<TreeContext> |
eventuallyPredicate applied to the enclosing tree context after a binary expression matches. |
Set<String> |
placeholdersNames that match a variable of that name, or a constant whose value is that name. |
ConstraintPredicate<Token> |
tokenPredicatePredicate applied to a binary operator token when the pattern and the candidate use different operator types. |
Set<String> |
varargPlaceholders
|
| Constructor and description |
|---|
MatchingConstraints() |
Predicate that matches any token.
Predicate applied to the enclosing tree context after a binary expression matches. Absent means that check succeeds.
Names that match a variable of that name, or a constant whose value is that name.
Predicate applied to a binary operator token when the pattern and the candidate use different operator types. Absent means that difference fails the match.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.