T
- the type of RelationalExpressionWithPredicate
to match againstpublic class TypeWithPredicateMatcher<T extends RelationalExpressionWithPredicate> extends TypeMatcher<T>
RelationalExpressionWithPredicate
with a given predicate (as determined by
RelationalExpressionWithPredicate.getPredicate()
and a given matcher against the children.Modifier and Type | Method and Description |
---|---|
Stream<PlannerBindings> |
matchWith(RelationalExpression expression)
Attempt to match this matcher against the given expression reference.
|
static <U extends RelationalExpressionWithPredicate> |
ofPredicate(Class<? extends U> expressionClass,
ExpressionMatcher<? extends QueryPredicate> predicateMatcher) |
static <U extends RelationalExpressionWithPredicate> |
ofPredicate(Class<? extends U> expressionClass,
ExpressionMatcher<? extends QueryPredicate> predicateMatcher,
ExpressionChildrenMatcher childrenMatcher) |
static <U extends RelationalExpressionWithPredicate> |
ofPredicate(Class<? extends U> expressionClass,
ExpressionMatcher<? extends QueryPredicate> predicateMatcher,
ExpressionMatcher<? extends Bindable>... children) |
getChildrenMatcher, getRootClass, matchWith, matchWith, of, of, of
@Nonnull public Stream<PlannerBindings> matchWith(@Nonnull RelationalExpression expression)
ExpressionMatcher
matchWith()
should only attempt to match the given root with this planner
expression and should not call into the ExpressionChildrenMatcher
returned by ExpressionMatcher.getChildrenMatcher()
or attempt to access children of the given expression.matchWith
in interface ExpressionMatcher<T extends RelationalExpressionWithPredicate>
matchWith
in class TypeMatcher<T extends RelationalExpressionWithPredicate>
expression
- a planner expression to match withPlannerBindings
containing the matched bindings, or an empty stream is no match was foundpublic static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher)
@SafeVarargs public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionMatcher<? extends Bindable>... children)
public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionChildrenMatcher childrenMatcher)