Skip to main content
Moderne OnlyThis recipe is proprietary to Moderne and runs on the Moderne platform or CLI — it isn’t part of the open-source catalog. Available with a Moderne subscription.Contact Sales

Find Java lambda receiver references

Recipe IDio.moderne.prethink.FindJavaLambdaReceiverReferences
Artifactio.moderne.recipe:rewrite-prethink

Report bare ordinary invocation selects that reference a formal declared by their nearest owning lambda, with original node identities, individual formal declaration ranges and recorded opaque types. Reassignment retains the lexical declaration; static calls written through a formal remain lexical qualifier references. Excludes outer captures, class or method boundary crossing, field or chained receivers, target formal mapping and runtime dispatch. Does not change sources.

Single recipeOpenRewriteModerne Proprietary License
Try in PlatformTry this recipe in the Moderne platform. Not a user yet? You’ll get a no-setup demo environment, with nothing to install or configure.

Usage​

Run this recipe

This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindJavaLambdaReceiverReferences

If the recipe is not available locally, then you can install it using:

RELEASE resolves to the newest release and LATEST to the newest build of any kind, including snapshots. Either one lets mod config recipes upgrade pull in later versions without editing this command; a pinned version stays where you put it.

mod config recipes jar install io.moderne.recipe:rewrite-prethink:RELEASE

Data tables​

Java lambda receiver references
io.moderne.prethink.table.JavaLambdaReceiverReferences

Own nearest-lambda formal declarations referenced by bare ordinary invocation selects, with actual node identities, source ranges and nullable opaque static types. Retains occurrence multiplicity within one exact input and producer namespace. Excludes outer captures and class or method boundary crossing; no runtime dispatch, functional-formal mapping or ID normalization.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.prethink.table.JavaLambdaReceiverReferences
ColumnDescription
Source pathActual Java compilation-unit source path.
Source setActual sole JavaSourceSet name; null for missing or ambiguous source-set markers; empty preserved independently of project markers.
Project IDActual sole JavaProject marker UUID; null for missing or ambiguous project markers; no identity remapping.
Project nameActual sole JavaProject name; descriptive only, with null and empty preserved independently of source-set markers.
Source set IDActual sole JavaSourceSet marker UUID; null for missing or ambiguous source-set markers.
Source file IDActual compilation-unit UUID in the exact original input and producer namespace; equal values never prove body UUID equality.
Lambda IDActual nearest owning J.Lambda UUID; no source ordinal or synthetic lambda identity.
Lambda start lineFull owning lambda coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Lambda start columnFull owning lambda coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Lambda end lineFull owning lambda coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Lambda end columnFull owning lambda coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Parameter declaration IDActual own formal declaration node UUID: J.VariableDeclarations.id for VARIABLE_DECLARATIONS, or the actual formal Identifier.id for IDENTIFIER. Never manufacture a container ID.
Parameter IDActual sole NamedVariable.id for VARIABLE_DECLARATIONS, or actual formal Identifier.id for IDENTIFIER. Not the declaration name Identifier ID when a NamedVariable exists.
Parameter kindActual formal representation tag VARIABLE_DECLARATIONS or IDENTIFIER. Other or malformed representations are unsupported; no fabricated nodes.
Parameter indexZero-based written formal order within the owning lambda, ignoring only J.Empty placeholders; unsupported parameters do not renumber later formals. No target functional-method formal mapping.
Parameter nameWritten own lambda formal simple name. Lexical declaration reference only; reassignment retains the same declaration and aliases do not qualify.
Parameter typeActual non-Unknown formal JavaType.toString() opaque string; null for missing or Unknown. Never copied from another node or parsed as a generic signature.
Parameter start lineActual full formal declaration node, including written type and annotations when present coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Parameter start columnActual full formal declaration node, including written type and annotations when present coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Parameter end lineActual full formal declaration node, including written type and annotations when present coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Parameter end columnActual full formal declaration node, including written type and annotations when present coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Invocation IDActual ordinary J.MethodInvocation UUID whose bare select refers to the nearest lambda own formal. Zero-argument calls included; not a native match or symbol ID.
Select IDActual bare J.Identifier invocation select UUID. No field, capture, cast, parenthesis or chained outer receiver inference.
Invocation start lineFull ordinary invocation coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Invocation start columnFull ordinary invocation coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Invocation end lineFull ordinary invocation coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Invocation end columnFull ordinary invocation coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Select start lineBare select Identifier coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Select start columnBare select Identifier coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Select end lineBare select Identifier coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Select end columnBare select Identifier coordinate from unchanged Coordinates: one-based lines and UTF-16 columns, tab one, CRLF-aware, exclusive end.
Select sourceExact unchanged Coordinates printed source slice of the bare select Identifier; no trimming, normalization or evaluation.
Select typeActual non-Unknown select Identifier JavaType.toString() opaque string; null for missing or Unknown. No copied formal type or runtime receiver claim.
Source files that had results
org.openrewrite.table.SourcesFileResults

Source files that were modified by the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileResults
ColumnDescription
Source path before the runThe source path of the file before the run. null when a source file was created during the run.
Source path after the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
Parent of the recipe that made changesIn a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all.
Recipe that made changesThe specific recipe that made a change.
Estimated time savingAn estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds.
CycleThe recipe cycle in which the change was made.
Source files that had search results
org.openrewrite.table.SearchResults

Search results that were found during the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SearchResults
ColumnDescription
Source path of search result before the runThe source path of the file with the search result markers present.
Source path of search result after run the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
ResultThe trimmed printed tree of the LST element that the marker is attached to.
DescriptionThe content of the description of the marker.
Recipe that added the search markerThe specific recipe that added the Search marker.
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrors

The details of all errors produced by a recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileErrors
ColumnDescription
Source pathThe file that failed to parse.
Recipe that made changesThe specific recipe that made a change.
Stack traceThe stack trace of the failure.
Recipe performance
org.openrewrite.table.RecipeRunStats

Statistics used in analyzing the performance of recipes.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.RecipeRunStats
ColumnDescription
The recipeThe recipe whose stats are being measured both individually and cumulatively.
Source file countThe number of source files the recipe ran over.
Source file changed countThe number of source files which were changed in the recipe run. Includes files created, deleted, and edited.
Cumulative scanning time (ns)The total time spent across the scanning phase of this recipe.
Max scanning time (ns)The max time scanning any one source file.
Cumulative edit time (ns)The total time spent across the editing phase of this recipe.
Max edit time (ns)The max time editing any one source file.