/** * Create a {@code String} name for the given {@code MethodInvocation} * that can be used for trace/logging purposes. This name is made up of the * configured prefix, followed by the fully-qualified name of the method being * invoked, followed by the configured suffix. * @see #setPrefix * @see #setSuffix */ protected String createInvocationTraceName(MethodInvocation invocation) { StringBuilder sb = new StringBuilder(getPrefix()); Method method = invocation.getMethod(); Class<?> clazz = method.getDeclaringClass(); if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) { clazz = invocation.getThis().getClass(); } sb.append(clazz.getName()); sb.append('.').append(method.getName()); sb.append(getSuffix()); return sb.toString(); }
/** * Create a {@code String} name for the given {@code MethodInvocation} * that can be used for trace/logging purposes. This name is made up of the * configured prefix, followed by the fully-qualified name of the method being * invoked, followed by the configured suffix. * @see #setPrefix * @see #setSuffix */ protected String createInvocationTraceName(MethodInvocation invocation) { StringBuilder sb = new StringBuilder(getPrefix()); Method method = invocation.getMethod(); Class<?> clazz = method.getDeclaringClass(); if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) { clazz = invocation.getThis().getClass(); } sb.append(clazz.getName()); sb.append('.').append(method.getName()); sb.append(getSuffix()); return sb.toString(); }
/** * Create a {@code String} name for the given {@code MethodInvocation} * that can be used for trace/logging purposes. This name is made up of the * configured prefix, followed by the fully-qualified name of the method being * invoked, followed by the configured suffix. * @see #setPrefix * @see #setSuffix */ protected String createInvocationTraceName(MethodInvocation invocation) { StringBuilder sb = new StringBuilder(getPrefix()); Method method = invocation.getMethod(); Class<?> clazz = method.getDeclaringClass(); if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) { clazz = invocation.getThis().getClass(); } sb.append(clazz.getName()); sb.append('.').append(method.getName()); sb.append(getSuffix()); return sb.toString(); }