Methref
object and call method name
on method reference. Could it be simpler?null
or zeros:null
or a method name if methods return type is a String
.Methref
where needed. However, they can be stored and reused.Methref
.Methref
in one place of code. Then, a user of your code will call a method on one of those proxies, but you don't have control over which. There is a way to detect the Methref
from the proxy by calling method isMyProxy
. Furthermore, there is a static
method lastName(instance)
that works like the Methref#lastName()
.