Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Pointcut Matching ?

I think i got the answer,
  
it would be
    pointcut setterPointcut(Object input): within(pkg.xyz.*) && args(input) && execution(* jsSet_*(*) );


Thanks
Rajat



From: Rajat Gupta <innocent_person1@xxxxxxxxx>
To: aspect-J <aspectj-users@xxxxxxxxxxx>
Sent: Fri, April 16, 2010 2:07:22 PM
Subject: [aspectj-users] Pointcut Matching ?

Hi all,

I has a pointcut
    pointcut setterPointcut(Object input): within(pkg.xyz.*) && args(input) && execution(* jsSet_*(*) throws *);

which matches with following methods

    public void jsSet_print(String xyz) throws Exception, IOException {
        System.out.println("Printing .... ");
    }

now i have another method,
    public void jsSet_print(String xyz) {
        System.out.println("Printing .... ");
    }

which doesn't have any throw exception, how should i modify my pointcut so that i can match both the methods,
i tried following which doesn't worked.
pointcut setterPointcut(Object input): within(pkg.xyz.*) && args(input) && execution(* jsSet_*(*)  *);

please suggest some alternative.

I would be very thankful to you.

-Rajat






Back to the top