3 ms·
(I had another comment here but I figured out the answer.) lombok's @Cleanup will close anything, interface or not.
by sixcorners 15y ago
(I had another comment here but I figured out the answer.)
lombok's @Cleanup will close anything, interface or not.
- grepgrep 15y agoI took a look at lombok and it's pretty obvious from the way cleanup method names can be passed as strings that's it's using reflection. It's a bit of a nasty hack, but it works.
- sixcorners 15y agoIt fiddles with the AST during compilation. No reflection.
- thebluesky 15y agoSounds like it's trying to add structural subtyping via the back door.