(This is difficult to search because results are all about "method reference")
I want to get a Method
instance for a lambda expression for use with a legacy reflection-based API. The clousure should be included, so calling thatMethod.invoke(null, ...)
should have the same effect as calling the lambda.
I have looked at MethodHandles.Lookup, but it only seems to be relevant for the reverse transform. But I guess the bind
method may help to include the clousure?
Aucun commentaire:
Enregistrer un commentaire