Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is there access to the "actual" pointcut when an advice is executed?

Hi,

2008/12/5 Jason Weinstein <Jason.Weinstein@xxxxxxx>:
> 1) Are there any listeners available for when a class is woven??

You can register your own message handler that will be called for
weaving messages.

-XmessageHandlerClass:...	Provide alternative output destination to
stdout/stderr for all weaver messages. The given value must be the
full qualified class name of a class that implements the
org.aspectj.bridge.IMessageHandler interface and is visible to the
classloader with which the weaver being configured is associated.
Exercise caution when packaging a custom message handler with an
application that is to be woven. The handler (as well as classes on
which it depends) cannot itself be woven by the aspects that are
declared to the same weaver.

The information you will be called with will be the same as that which
comes out in the existing weaveinfo messages.

> 2) Is there access to the "actual" pointcut when an advice is executed?

Hmmm, I don't think that information is exposed right now.  Although
there is something funky in the depths of AspectJ that enables the
Pointcut Doctor to run ( http://pointcutdoctor.sourceforge.net/ ) -
the same infrastructure may reveal the information you want to see
too.

Andy.

>
> As an example
>
> This pointcut
>
> public pointcut NormalizedMessage_new() :
>   call(NormalizedMessage+.new(..));
>
> This is thisJoinPoint.toLongString()
>
> "call(public com.sun.jbi.messaging.MessageImpl())"
>
>
> Which is different. I'd like to have access to
>
> "call(NormalizedMessage+.new(..))"
>
> and really
>
> NormalizedMessage_new() :
>   call(NormalizedMessage+.new(..));
>
>
>
> I'd like to have a GUI which shows all active joinpoints and allows a user
> to add new joinpoints, remove them, and edit the code which runs when the
> joinpoint is executed.
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top