Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » 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 name
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 Clement
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: Mon Oct 20 21:17:05 GMT 2014

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

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