Class ReturnsMono
- All Implemented Interfaces:
com.google.errorprone.matchers.Matcher<ExpressionTree>,Serializable
Functions that return a reactor.core.publisher.Mono.
Refaster template method parameter types enable one to constrain the type of expressions matched by the "free variables" represented by the associated method parameters. For this, Refaster relies on the Java compiler to determine the type of candidate expressions. For lambda expressions and method references, the inferred type is one that is compatible with the associated assignment, invocation or casting context. It is important to note that this inferred type is not necessarily the most specific compatible type.
This matcher addresses that issue for the specific case in which one wishes to e.g. match
expressions that are assignment/invocation/cast-compatible with Function<String, Mono<?
extends String>>, but are in fact typed Function<String, Publisher<? extends String>>.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(ExpressionTree tree, com.google.errorprone.VisitorState state)
-
Constructor Details
-
ReturnsMono
public ReturnsMono()Instantiates a newReturnsMonoinstance.
-
-
Method Details
-
matches
- Specified by:
matchesin interfacecom.google.errorprone.matchers.Matcher<ExpressionTree>
-