• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how to create an aspect triggering all non-void methods

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm relatively new to AOP/ aspectJ. I was looking in the doc for a possibility, how to capture any return value, in other words all methods not returning null (of any class). I saw ways to capture a method name and parameters, but not how would I capture a non-void method call?

Thanks for help
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mark baum wrote:Hi,

I'm relatively new to AOP/ aspectJ. I was looking in the doc for a possibility, how to capture any return value, in other words all methods not returning null (of any class). I saw ways to capture a method name and parameters, but not how would I capture a non-void method call?

Thanks for help



How about for the return type to be just "*" like

* *(..)

That one will be any return type, of any method, with any parameters.
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic