Re: Shortcut for obtaining a MethodHandle for an anonymous code fragment

2021-11-06 Thread Florian Weimer
* Vladimir Ivanov: >> Is it true that there is no shortcut for obtaining a method handle for >> some code fragment? >> >> That is, there is no way to write something like this? >> >>MethodHandle repeatIt = (String x) -> x + x; >> >> Instead it's necessary to give the expression a name and

Re: Shortcut for obtaining a MethodHandle for an anonymous code fragment

2021-01-11 Thread Vladimir Ivanov
Is it true that there is no shortcut for obtaining a method handle for some code fragment? That is, there is no way to write something like this? MethodHandle repeatIt = (String x) -> x + x; Instead it's necessary to give the expression a name and put it into a static method somewhere,

Shortcut for obtaining a MethodHandle for an anonymous code fragment

2021-01-10 Thread Florian Weimer
Is it true that there is no shortcut for obtaining a method handle for some code fragment? That is, there is no way to write something like this? MethodHandle repeatIt = (String x) -> x + x; Instead it's necessary to give the expression a name and put it into a static method somewhere, and