Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » How to find instanceof return type?
How to find instanceof return type? [message #825632] Wed, 21 March 2012 03:54 Go to next message
Ashish Missing name is currently offline Ashish Missing nameFriend
Messages: 4
Registered: July 2009
Junior Member
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 16:09 Go to previous message
Andrew Clement is currently offline Andrew ClementFriend
Messages: 162
Registered: July 2009
Senior Member
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: Thu Apr 25 20:31:39 GMT 2024

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

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

Back to the top