Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » around advice question
around advice question [message #591962] Tue, 24 January 2006 16:40
Asaf is currently offline AsafFriend
Messages: 36
Registered: July 2009

I'm testing the usage of Aspectj and encountered a problem.

I wrote the following code:

public aspect myAspect{

pointcut publicMethods() : execution(public * myMain.func(..));

pointcut logObjectCalls() : execution(* Logger.*(..));

pointcut loggableCalls() : publicMethods(); //l&& ! logObjectCalls();

before() : loggableCalls(){



after() : loggableCalls(){



void around(): call(public void myMain.func(String)){

if(Math.random() > .5){

System.out.println("> 0.5");

proceed(); //go ahead with the method call



System.out.println("< 0.5");




The function FUNC of MYMAIN class has only one argument which is of String

What I would like to achieve is that I will be able to check the input
parameters in the AROUND advice.

Thanks in advance,

Asaf Lahav
Previous Topic:Can ajdt works with product's export?
Next Topic:pointcut all method calls on an object that implements an interface
Goto Forum:

Current Time: Sat Nov 28 23:53:09 GMT 2015

Powered by FUDForum. Page generated in 0.01623 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software