Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weaving aspects into libraries

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
>
>


Back to the top