aspectj - How to get the caller method information from Around advise -
thisjoinpoint can current method information, anyway caller method information?
you can try special variable thisenclosingjoinpointstaticpart holds static part of enclosing joinpoint.
mentioned here (example) , here (docs)
or if using annotation-based aspectj, pass following advice method's parameters, e.g.:
@before("call( /* pointcut definition */ )") public void mycall(joinpoint.enclosingstaticpart thisenclosingjoinpointstaticpart) { // ... } mentioned here
Comments
Post a Comment