@Incubating
public final class MonadicCarrierRegistry
extends Object
The standard carrier allow-list for monadic comprehensions: stdlib and
Groovy-core carriers whose bind/map method names diverge from the structural
flatMap/map convention.
Carriers known by Class (always on the classpath) are matched by
isInstance; carriers known only by name — third-party libraries
that Groovy must not depend on, such as Functional Java and Vavr — are
matched by walking the value's type hierarchy and comparing fully-qualified
names. The CompletionStage entry covers CompletableFuture;
the Awaitable entry covers DataflowVariable; the Functional
Java entries use that library's bind/map convention; the
Vavr entries use the structural flatMap/map convention.
| Modifiers | Name | Description |
|---|---|---|
static class |
MonadicCarrierRegistry.Entry |
One Class-keyed allow-list row. |
static class |
MonadicCarrierRegistry.NamedEntry |
One name-keyed allow-list row, for carriers Groovy must not depend on. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static List<Entry> |
entries()The Class-keyed allow-list, exposed for the type-checking extension. |
|
public static String[] |
lookupBindMap(Object carrier)The [bind, map] method names for the given carrier value, or
null if it is not on either allow-list. |
|
public static List<NamedEntry> |
namedEntries()The name-keyed allow-list, exposed for the type-checking extension. |
The Class-keyed allow-list, exposed for the type-checking extension.
The [bind, map] method names for the given carrier value, or
null if it is not on either allow-list. Class entries are
tried first (isInstance), then name entries against the value's
full type hierarchy (so fj.data.Some matches fj.data.Option).
The name-keyed allow-list, exposed for the type-checking extension.