Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] (no subject)

Just a quick reply - do you perhaps mean:

pointcut myJsr94Class(): somecall() && !cflowbelow(somecall()) ;

(i.e. with a '!' in front of the cflowbelow()) - to mean 'call to
executeRules and not in the control flow (below) of a call to
executeRules'...

Andy.



On 21/11/05, vinodh.t.subbiah@xxxxxxxxxxxx
<vinodh.t.subbiah@xxxxxxxxxxxx> wrote:
>
> Hi all,
>  I'm new to AspectJ and I write a point cut for a method as shown
>
> Point Cuts as shown below :
>
> pointcut somecall(): call(* *.executeRules(..)) ;
> pointcut myJsr94Class(): somecall() && cflowbelow(somecall()) ;
>
>
> Before and After advices  :
>
> before(): myJsr94Class() {
>                 System.out.println("***jsr enter --> "
>                                 +
> thisJoinPointStaticPart.getSignature());
>         }
>         after() returning:myJsr94Class() {
>                 System.out.println("***jsr enter --> "
>                                 +
> thisJoinPointStaticPart.getSignature());
>
>         }
>
> It shows this advices in 6 places on my program.But when I run the program
> Im not able to see the System.out messages.
> Can someone tell me am i doing anything wrong here,
>
> Im using RAD 6.0 with AspectJM5
>
>
>
> The code which suppose to get advised is below
> StatelessRuleSession stateless =
>                                 (StatelessRuleSession)
> runtime.createRuleSession(
>                                         bindUri,
>                                         null,
>
> RuleRuntime.STATELESS_SESSION_TYPE);
> Main jsrimpl = new Main();
> List objects = new ArrayList();
> objects.add(new BREParam("xml_in", jsrimpl.getXMLString(inputFileName)));
> stateless.executeRules(objects)                ---------------> Pointcut
> will advise this line so Im expecting before and after this line to see
>
>                 the  System out messages
>
>
> Thanks in advance.
> Vinodh
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
>
>


Back to the top