Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sixcorners
· 14y ago · 0 comments
(I had another comment here but I figured out the answer.)
lombok's @Cleanup will close anything, interface or not.
Comments
[–]
grepgrep
14y ago
I 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
OP
14y ago
It fiddles with the AST during compilation. No reflection.
[–]
thebluesky
14y ago
Sounds like it's trying to add structural subtyping via the back door.