java - Getting the name of class intersected by a pointcut -
class sampleclass{ childclass childclass; public void init(){ childclass = childutil.getchildclass(); childclass.callservice("batman"); } }
aspect
@aspect public class callserviceaspect{ @after("execution(* com.xyz.childclass.callservice(..))") public void aftercallservice(joinpoint jp){ log.debug(jp.gettarget().getname()); } } i want name of class within callservice method intersected aspect(i.e. sampleclass). there way obtain it?
in place of intercepting through execution, used call. able utilize jp.getthis() sampleclass name.
java spring aop aspectj spring-aop
No comments:
Post a Comment