[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Weaving aspects into libraries
|
- From: "Andy Clement" <andrew.clement@xxxxxxxxx>
- Date: Thu, 10 Apr 2008 08:46:07 -0700
- Delivered-to: aspectj-users@eclipse.org
- 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=pd7fHB+vjJQRR71xUzw5S4GRe0gca/AJNE5aFIdwkOk=; b=XIZS2rmW0hUQHItVR8aQCdNEy6uN8tyC74tmbNCDSuXE+gaV+zJcJCr5YkSQNN9ui2fHwHC/dpoHrTfuzu2a+ZKGYZur8TwCYPKHOpqd0pyizSqycprj9eRdrbai9WZCAm+rFbVmGQAok38jhJqKyIzFckemGLI2HPCJsEFl6ss=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bIREUw6v+JaCnZQyPHUQOC709d8okLkaTJ7hRO0AIxEKggFAGVz6V9K280pf54Rda/XesIObRGlR47ctyi9HDIa55sGs3TS09vJfCRz9Ay6y+HPFzrMymDAmWPOZhD3MONFUOHwi+DRsloYnKM7D1a8pK1bZz9XRHzhQWPR0Y/s=
With the command line compiler it can be as simple as
ajc -inpath frameworkCode.jar MyAspect.java -outjar modifiedFrameWorkCode.jar
aspect could be something vaguely like:
aspect Demo {
pointcut setVisibleCall(): call(* setVisible(..)) &&
within(com.someframework..*);
void around(): setVisibleCall() {
// proceed(); uncomment this line to invoke setVisible(), leave
it commented out to
// not make the call
}
}
Andy
On 10/04/2008, Matthias.Gaiser@xxxxxxxxxxxxx
<Matthias.Gaiser@xxxxxxxxxxxxx> wrote:
>
>
>
>
> Hi.
>
>
>
> I am bloody beginner in aspect-oriented programming and started to use it
> today.
>
>
>
> Now I have a concern, wondering if this is possible and if it is worth to
> spend more time in AspectJ.
>
> I am using a third party library which is creating dialogs based on a Frame
> I initialize this library with, so my Frame is the parent of all dialogs
> which are popping up. Via the Frame I can then access the dialogs and handle
> them like I want to. Now I do not want to have the dialogs displayed and was
> thinking about implementing an aspect which prevents my third party library
> from calling setVisible() on the dialogs.
>
>
>
> Is it possible to weave aspects into code of other libraries? How is it
> possible?
>
>
>
> Thanks for anyone reading and thinking about it.
>
> Matthias.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>