Closed twalthr closed 10 years ago
Very nice. It might not be pretty, but I think it's the only way to get the lambda function types. I don't like the Wrapper, I see that it was the easiest way to do it here but for a release we can easily get rid of that.
Also, this will fail right now when you pass in an object (anonymous inner class) that directly derives from GenericMap
, here we cannot use the lambda resolution logic but the old logic with getGenericInterfaces()
.
Yes, you are right. I have prepared the new getMapReturnTypes()
method. We then need to rework getParameterType()
as it does not support interfaces as "base class". After the rework is done we can get rid of getMapReturnTypes(MapFunction<IN, OUT> mapFunction, TypeInformation<IN> inType)
.
This PR shows how we could implement Java 8 Lambdas into the current master without changing much code. I implemented a Lambda Mapper. An example job shows that it is working.
See also #612.