1
class SampleClass{
ChildClass childClass;
public void init(){
childClass = ChildUtil.getChildClass();
childClass.callService("batman");
}
}
화면 나는 callService 방법은 측면 (즉. SampleClass)에 의해 교차 된 내 클래스의 이름을 원하는포인트 컷
@Aspect
public class CallServiceAspect{
@After("execution(* com.xyz.ChildClass.callService(..))")
public void afterCallService(JoinPoint jp){
log.debug(jp.getTarget().getName());
}
}
에 의해 교차 클래스의 이름을 얻기. 그것을 얻을 수있는 방법이 있습니까?
'callService'는 정적입니까? –
^nope. 편집하겠습니다. – sudeepdino008
가능한 [주변에서 발신자 정보 정보를 얻는 방법] (http://stackoverflow.com/questions/5630809/how-to-get-the-caller-method-information-from-around-advise) –