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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -