I have the aspect:
public aspect TestAspect {
pointcut publicMethodExecuted(): execution(public !static * *(..));
int around() : publicMethodExecuted() {
//I need parameters values here
//to write their to log
int original_return_value = proceed();
return original_return_value * 100;
}
}
How to get parameters the method was called with? I need to write their to log file.
I'm most interested in a native AspectJ
-way, not using reflection.
Sorry If I misunderstood but this should bring the parameters
Object[] args = thisJoinPoint.getArgs();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With