Visitar URL original
Introduction to Method Handles tutorial by smthelusive · Pull Request #90 · java/devjava-content · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
suggestion for uppercase sentence
  • Loading branch information
carimura authored and smthelusive committed Jun 1, 2024
commit 344575ab456671cf914ac2c0cf913bbec5ff1706
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ for a result placeholder in `target` method argument list.
Similarly to arguments, we can use an adapter that will apply transformations to the return value.

Let's imagine a situation where we have a method that returns a `String`, and we would like to channel any returned
value from this method into another method that replaces character `d` with `m` and brings the resulting value to the
uppercase.
value from this method into another method that replaces character `d` with `m` and uppercases the resulting value.

Here's the method handle for the `getSomeString` method which always returns the value `"dummy"`:

Expand Down