I know how to create a reference to a method that has a String parameter and returns an int, it\'s:
Function
This problem has been bothering me as well; this is why I have created this project.
With it you can do:
final ThrowingFunction f = yourMethodReferenceHere;
There are a totla of 39 interfaces defined by the JDK which have such a Throwing equivalent; those are all @FunctionalInterfaces used in streams (the base Stream but also IntStream, LongStream and DoubleStream).
And as each of them extend their non throwing counterpart, you can directly use them in lambdas as well:
myStringStream.map(f) // <-- works
The default behavior is that when your throwing lambda throws a checked exception, a ThrownByLambdaException is thrown with the checked exception as the cause. You can therefore capture that and get the cause.
Other features are available as well.