Skip to main content



      Home
Home » Language IDEs » AspectJ » How to find instanceof return type?
How to find instanceof return type? [message #825632] Tue, 20 March 2012 23:54 Go to next message
Eclipse UserFriend
I have the following @Pointcut with an annotation:
@Pointcut(value="execution(@MyAnnotation * *(" + "MyMessage,..)) &&" +
args(m,..) && @annotation(myanno)")
public void messageProcessing(MyAnnotation myanno, MyMessage msg) {}

@After(value="messageProcessing(myanno, msg), argNames="myanno, msg")
public void afterMessageProcess(MyAnnotation myanno, MyMessage msg) {
// -- do something
}

What I also want is if the return type of the method is of type say, 'X' then do something with the X.

Appreciate your help,
Re: How to find instanceof return type? [message #855218 is a reply to message #825632] Tue, 24 April 2012 12:09 Go to previous message
Eclipse UserFriend
Take a look at the AfterReturning annotation, described here: http://www.eclipse.org/aspectj/doc/released/adk15notebook/ataspectj-pcadvice.html#advice

which allows you to capture the return value. (you are likely to get faster answers on the regular mailing lists that on this forum).

cheers,
Andy
Previous Topic:AJDT problem during developing a plug-in
Next Topic:Multiple launcher configuration
Goto Forum:
  


Current Time: Wed May 14 18:22:09 EDT 2025

Powered by FUDForum. Page generated in 0.03202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top