[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-dev] context in staticinitialization
|
And for a list of context available at each join point, read the section
"Join Points" in the programming guide appendix "Language Semantics":
http://www.eclipse.org/aspectj/doc/released/progguide/semantics-joinPoints.html
I suspect Marc is looking for
thisJoinPointStaticPart.getSignature().getDeclaringType()
(hmm: getDeclaringType() does return the class in the static
initialization join point!)
Wes
> ------------Original Message------------
> From: Matthew Webster <matthew_webster@xxxxxxxxxx>
> To: "AspectJ developer discussions" <aspectj-dev@xxxxxxxxxxx>
> Date: Mon, Oct-3-2005 9:25 AM
> Subject: Re: [aspectj-dev] context in staticinitialization
>
>
>
>
>
> MAC,
>
> You can always use thisJoinPoint. When there is no currently executing
> object, as with static methods, the getThis() returns null. Also
> getTarget() and getArgs() may return something useful although not for
> a
> staticinitializer.
>
> Matthew Webster
> AOSD Project
> Java Technology Centre, MP146
> IBM Hursley Park, Winchester, SO21 2JN, England
> Telephone: +44 196 2816139 (external) 246139 (internal)
> Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/
>
> Alexandru Popescu <the.mindstorm.mailinglist@xxxxxxxxx>@eclipse.org on
> 03/10/2005 17:35:03
>
> Please respond to AspectJ developer discussions
> <aspectj-dev@xxxxxxxxxxx>
>
> Sent by: aspectj-dev-bounces@xxxxxxxxxxx
>
>
> To: AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>
> cc:
> Subject: Re: [aspectj-dev] context in staticinitialization
>
>
> #: Marc Cherfi changed the world a bit at a time by saying on
> 10/3/2005
> 4:27 PM :#
> > Hi all,
> >
> > i need to get context infromation about class on staticinitialization
> > pointcut.How can i do ? I know that thisJointPoint form isn't
> available
> > but if anyone has a pattern to do that .....
> >
> > Thanks in adavnce.
> >
> > MAC
>
> I think you can use the thisJoinPointStaticPart instead.
>
> ./alex
> --
> .w( the_mindstorm )p.
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>