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 obtain a MethodHandle for it using
MethodHandles.lookup().
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
https://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to