greenDAO icon indicating copy to clipboard operation
greenDAO copied to clipboard

Allow Java 8 Lambda and function references within Entity classes

Open GottaGetSwifty opened this issue 9 years ago • 8 comments

I'm using functional java with retro-lambda in a project, but if an Entity class has non-generated methods that use any of the features it gives build errors such as

Pb(646) Method references are allowed only at source level 1.8 or above Pb(647) Constructor references are allowed only at source level 1.8 or above

My work around if I want to use with lambda or function references is to move those things to a helper class, but this is obviously not ideal.

It seems Android is moving toward supporting Java 8 features as well, so it would be helpful if greenDAO either supported the features natively, or at least allowed user-created methods to use the features.

In a perfect world native support for Optionals would be added as well, but that's probably slightly more niche

GottaGetSwifty avatar Aug 22 '16 23:08 GottaGetSwifty

Any clue if greenDAO is going to support lambdas?

jmendezv avatar Nov 19 '16 21:11 jmendezv

Technically we only should have to change the greenDAO Gradle Plugin from parsing/generating at level 1.7 (Java 7) to level 1.8 (Java 8). Not sure if any other changes would be required. -ut

greenrobot-team avatar Nov 21 '16 07:11 greenrobot-team

Any news on this one?

VaiTon avatar Jul 04 '20 11:07 VaiTon

@VaiTon Not sure. Have you tried with 3.3.0?

greenrobot-team avatar Jul 14 '20 05:07 greenrobot-team

@greenrobot-team tried, failed. please add Java 8 Lamda support. Thanks a lot

octbluedream avatar Jul 31 '20 03:07 octbluedream

@greenrobot-team tried, failed. please add Java 8 Lamda support. Thanks a lot

softboy99 avatar Aug 14 '20 05:08 softboy99

@greenrobot-team Any news on this one?

softboy99 avatar Aug 14 '20 06:08 softboy99

@greenrobot-team +1

axonxorz avatar Feb 28 '21 18:02 axonxorz