I'm writing some aspect for our system's method input validation:
- Every method's return object all derived from a common base class which has a property holds return code.
- Pointcut defines which package to intercept
- Write aspects doing validation of method's input. If validation succeeded, proceed() to execute method. If failed, set the return code property of method's returning object and returns directly.
My question is: How to get the real return object class besides the base class? I can only know the base class I should return but not the real class. I found nothing in ProceedingJointPoint, getSignature() only has class name...