Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Aspectj in weaving a jar file

I have to assume it is related to the pointcuts involved.  Hopefully you are doing something like this:

aspect MyAspect {
  before(): execution(* add(..)) {
    System.out.println(“add() is about to run”);
  }
  before(): execution(* display(..)) {
    System.out.println(“display() is about to run”);
  }
}

ajc -inpath myjar.jar MyAspect.aj -outjar mywoven.jar 

Then use mywoven.jar

If your pointcuts are misbehaving, try to generalize them with wildcards to see which bit you are getting wrong. Mine above is as basic as it can be - does that advise your display() method?

cheers,
Andy

On Oct 9, 2014, at 8:54 PM, mufc_fan <rajeshkumarit8292@xxxxxxxxx> wrote:

> Hi I am new to aspectj. I have a jar in which function named add exists which
> calls another function display. I imported it into the aspectj aj file and
> wrote pointcut for the function display but it never works. But it works for
> the function add. Can any one share their knowledge...
> Thanks...
> 
> 
> 
> --
> View this message in context: http://aspectj.2085585.n4.nabble.com/Aspectj-in-weaving-a-jar-file-tp4651584.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top