[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] Export an aspectj enabled feature.
- From: "Andy Clement" <andrew.clement@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 09:45:27 +0000
- Delivered-to: email@example.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AXlHZA1va/5KPanU3SdT9VvFwBuBaSqvxhB6hMcA/a0=; b=OdLioi62LBFp14SwONn8TwvHjvh/U5H+Ewleh5fuf3wbghajkFOOprn4mVQm+ztABiWmg6l3XdrjFlVoSYfLj/DWmDzv325NjjmyJWbE+uszypRdzL8WFl+J9CBrl9DehyBycxzW/Qjm9zwAIUW3LjXsFQenQ3Uc6nS+7dNVBBg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HAkexmjLBPWC5xmJ3rP2UCoDy3HasPgQzYc84Tfj9JwNdl55JL13jIXgQFj/EHyuTPx8KtYGhPncohycYttRE+obvM9W6XmjgTcoO/pzIFQEMszCOZQtC+zjZvvwMj6PM5BweNip121+b3/rFXMjgB7SvJb3oiLuIF6A5T43bEc=
> Thanks for your answer. Just for curiosity, why is the aspectjrt.jar needed
> in runtime when performing compile-time weaving? Shouldn't it be possible to
> perform some post-compilation step in Eclipse where the aspectj compiler
> statically modifies the byte-code produced by Eclipse when exporting the
> plugin? This way you would have no dependency to aspectj what so ever. I'm
> sure that there's a very good reason though :).
There are a few common types that all woven code uses, for example
NoAspectBoundException which is thrown when an aspect instance is
missing, or the classes that implement thisJoinPoint. I don't think
the inclusion of a small jar is too painful. The alternative of
generating all these classes for each built system I can imagine
getting into problems when multiple versions of the same types are
encountered in a complete running system.
> When you say that I should turn off Build Automatically for my project, do
> you mean that I have to turn off the Eclipse compilation as well? There's no
> way to just turn off automatic aspectj weaving for a certain project? I
> think I've run into the problem that you're describing and it's quite time
> consuming have to wait for the weaving process so often.
Yep - turns off the eclipse compilation too - but doesn't necessarily
turn off the eager parsing that shows the red squigglies for you in
the editor. There is no nice way to turn off weaving. If working
with code style then the resultant bytecode from compilation is not
well formed, it must be 'completed' by the weaver to be consistent.
I don't want people running the incomplete bytecode because they then
start reporting invalid bugs.