}
}
private MonitoredCall composeCall(ProceedingJoinPoint pjp) {
Method method = getMethod(pjp);
MonitoredCall call;
if (method != null) {
String methodName = method.getName();
call = new MonitoredCall(pjp.getTarget().getClass().getSimpleName(), methodName, pjp.getArgs());
Monitored annotation = method.getAnnotation(Monitored.class);
if (annotation != null) {
call.logArgs = annotation.logArgs();
call.setMsg(annotation.message());
}
} else {
//todo:Dima need to be refined
Signature signature = pjp.getSignature();
call = new MonitoredCall(signature.getDeclaringType().getSimpleName(), signature.getName(), pjp.getArgs());
}
return call;
}