Try something like…

 

pointcut notifyExecute(Event e) :
    call(StateTransition execute(..)) && args(e);

 

  after(Event event) returning : notifyExecute(event) {
    System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Call after Execute aspect");
    System.out.println("End Time in millis: " + System.currentTimeMillis());

    ystem.out.println(Event was: +event);
  }

 

 

Eric

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Lauder
Sent: Monday, October 16, 2006 4:43 PM
To: [email protected]
Subject: [aspectj-users] Passing parameters

 

I am trying to pass parameters from the point cut into the after advice.

 

My point cut gets the correct classes that I wish woven.  The problem is getting the values passed in to point cut into the advice.

 

Simply:

pointcut notifyExecute() :
    call(StateTransition execute(..));

 

  after() returning : notifyExecute() {
    System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Call after Execute aspect");
    System.out.println("End Time in millis: " + System.currentTimeMillis());
  }

 

There is an Event param that gets passed into the execute method and I would like to get access to the object within the after advice.

 

 

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to