[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] How to "disable" aspect
|
This isn't the most elegant solution, but it works if you need to turn it on and off easily...
public aspect ManagerSecurity
{
final boolean RUN = true;
pointcut myPointcut(): call(* com.test.*.*(..));
before(): myPointcut() {
if(RUN)
{
// Do Stuff Here
}
}
}
----- Original Message ----
From: Josh <gemini929@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Sent: Wednesday, April 18,
2007 10:14:13 AM
Subject: Re: [aspectj-users] How to "disable" aspect
Jesse,
Can you give me an example?
Joshua
On 4/18/07, Jesse Hepburn <jesse_hepburn@xxxxxxxxx> wrote:
I would use a constant within the pointcut to determine if it should be run or not.
----- Original Message ----
From: Josh <
gemini929@xxxxxxxxx>
To: aspectj-users <aspectj-users@xxxxxxxxxxx>
Sent: Wednesday, April 18, 2007 8:14:10 AM
Subject: [aspectj-users] How to "disable" aspect
I am a beginner with AspectJ. I have assembled several aspects which are usefull to my project. Some aspects, like the tracing aspect, I only use
occasionally. Is there a way to "disable" an aspect in the source code instead of removing the entire aspect from your source directory?
-Joshua
Ahhh...imagining that irresistible "new car" smell?
Check out
new cars at Yahoo! Autos.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Ahhh...imagining that irresistible "new car" smell?
Check out
new cars at Yahoo! Autos.