Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] A Pointcut that matches nothing

Yeah I think I generally used to do some kind of boolean flag..  I remember
seeing something like following aspect in the Kiselev book (one of the first
AspectJ books I think)

e.g.

aspect AllJoinPointsAspect {

	private boolean TRACE = true;

	before(): if(TRACE) && !within(AllJoinPointsAspect) {
		System.out.println("->"+thisJoinPoint);
	}
}

One of those very useful pointcut designators I find.




-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Martin Görg
Sent: 08 May 2008 08:52
To: neil loughran
Subject: Re: [aspectj-users] A Pointcut that matches nothing

neil loughran wrote:

> Try either 

> if(false) or if(true).. I can never recall which one it is!

That should be if(false). I'm aware that other constructs like the one
you suggest also work, but I was specifically looking for some "empty"
pointcut. I like the simplicity of it.

Cheers
Martin


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top