Le 29/11/2012 16:41, Matt Benson a écrit :
> Interesting; I apparently hadn't looked at Lombok apparently since they've
> added the @DoPrivileged annotation (pretty sure it wasn't always there).

You probably looked in the core of Lombok, @DoPrivileged is in the
companion project lombok-pg.


> My problem with Lombok is that, as I understand it, they have to resort to
> "tricks" due to the limitations of the public annotation processing APIs,
> they are only compatible with the Oracle compiler, have problems when used
> with other technologies e.g. AspectJ (IIRC).  If not for these shortcomings
> (and I have no doubt the Lombok team would have done things "correctly"
> were that option open to them) I would have been using Lombok long ago.

I guess the technique adopted by Lombok is the only one suitable for
generating new methods like getters and setters, otherwise the
compilation would fail when calling a not yet generated method. Bytecode
processing would not allow that.

For altering the body of existing methods like @DoPrivileged or
@SwingInvokeLater bytecode processing is perfectly fine.


Emmanuel Bourg


Attachment: smime.p7s
Description: Signature cryptographique S/MIME

Reply via email to