Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Newbie Method Call Question.

Michael,

How about just using getClass() on the value of this at the call join point, e.g.,

before(Action caller) : call(* businessMethod()) && this(caller) {
    logger.log("Call from "+caller.getClass());
}

Ron Bodkin
Chief Technology Officer
New Aspects of Software
o: (415) 824-4690
m: (415) 509-2895

> ------------Original Message------------
> From: "Michael Finger" <mfinger@xxxxxxxxxxxxxxxx>
> To: <aspectj-users@xxxxxxxxxxx>
> Date: Wed, Jun-2-2004 12:11 PM
> Subject: [aspectj-users] Newbie Method Call Question.
> 
> Hello,
>  I have a hopefully simple aspectj question I haven't been able to figure out:
> 
> I'm using struts and have the typical action class that call business objects. 
> 
> I've written some aspects that tell me when methods are being called in the business objects, this works fine, but I'm also interested in the names of the action classes that are calling the business object methods. In debugging situations I don't always know what action classes are calling the business objects, so an aspect that can spit out this info is of great value. 
> Is there an easy way to do this? I've played with the thisJoinPoint.
> 
> Thanks,
> Michael FInger
> 
> Michael Finger - Software Development, SV Technology
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 


Back to the top