Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Arguments and return type from org.aspectj.lang.Signature, or org.aspectj.lang.ProceedingJoinPoint

Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to find the return type of the method from org.aspectj.lang.Signature and org.aspectj.lang.ProceedingJoinPoint classes.

My code is like:

Form sig.toLongString() , I can get the entire thing.
From sig.getName(), I get the name of the method, which is getIt.
myTargetClass returns the name of the class, which is org.Service.MyClass.

pjp.getArgs() will return values of the arguments in an array which is good.

There is no API available to get the return type, which is java.util.List

I can use poor man's solution and parse the String obtained from sig.toLongString() to get the return type.

But I am wondering if there is any clean API available to get the return type (java.uti.List), instead of parsing sig.toLongString().

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic