Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Accessing the Method object within a pointcut...

It's not a keyword; it's part of the runtime reflective
access to the join point, which can mostly only be found
in the API docs :)

To get the parameter types in advice on the method-execution:

  CodeSignature code = (CodeSignature)
               thisJoinPointStaticPart.getSignature();
  // save this
  // later:  code.getParameterTypes();

Wes

Alan Brown wrote:

I have a pointcut that matches the methods of my public API.  When it is
triggered I wish to save the method object that is being called so I can
use reflection to invoke it later.  My problem is that my current way of
doing this is to grab the method name and the args and then reconstitute
the method later.  However, this falls down when the method is passed
'null' as an argument.
There must be a simple way of accessing the actual method object that
has been joined upon.  I have a workaround currently but it is ugly
beyond description and I can't believe it has to be that way.

I'm sure I must be missing a relevant key word that has been beyond my
research, and I'd appreciate a pointer toward it.

alan
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top