/** * Check the interceptorNames list whether it contains a target name as final element. * If found, remove the final name from the list and set it as targetName. */ private void checkInterceptorNames() { if (!ObjectUtils.isEmpty(this.interceptorNames)) { String finalName = this.interceptorNames[this.interceptorNames.length - 1]; if (this.targetName == null && this.targetSource == EMPTY_TARGET_SOURCE) { // The last name in the chain may be an Advisor/Advice or a target/TargetSource. // Unfortunately we don't know; we must look at type of the bean. if (!finalName.endsWith(GLOBAL_SUFFIX) && !isNamedBeanAnAdvisorOrAdvice(finalName)) { // The target isn't an interceptor. this.targetName = finalName; if (logger.isDebugEnabled()) { logger.debug("Bean with name '" + finalName + "' concluding interceptor chain " + "is not an advisor class: treating it as a target or TargetSource"); } String[] newNames = new String[this.interceptorNames.length - 1]; System.arraycopy(this.interceptorNames, 0, newNames, 0, newNames.length); this.interceptorNames = newNames; } } } }
/** * Check the interceptorNames list whether it contains a target name as final element. * If found, remove the final name from the list and set it as targetName. */ private void checkInterceptorNames() { if (!ObjectUtils.isEmpty(this.interceptorNames)) { String finalName = this.interceptorNames[this.interceptorNames.length - 1]; if (this.targetName == null && this.targetSource == EMPTY_TARGET_SOURCE) { // The last name in the chain may be an Advisor/Advice or a target/TargetSource. // Unfortunately we don't know; we must look at type of the bean. if (!finalName.endsWith(GLOBAL_SUFFIX) && !isNamedBeanAnAdvisorOrAdvice(finalName)) { // The target isn't an interceptor. this.targetName = finalName; if (logger.isDebugEnabled()) { logger.debug("Bean with name '" + finalName + "' concluding interceptor chain " + "is not an advisor class: treating it as a target or TargetSource"); } String[] newNames = new String[this.interceptorNames.length - 1]; System.arraycopy(this.interceptorNames, 0, newNames, 0, newNames.length); this.interceptorNames = newNames; } } } }
/** * Check the interceptorNames list whether it contains a target name as final element. * If found, remove the final name from the list and set it as targetName. */ private void checkInterceptorNames() { if (!ObjectUtils.isEmpty(this.interceptorNames)) { String finalName = this.interceptorNames[this.interceptorNames.length - 1]; if (this.targetName == null && this.targetSource == EMPTY_TARGET_SOURCE) { // The last name in the chain may be an Advisor/Advice or a target/TargetSource. // Unfortunately we don't know; we must look at type of the bean. if (!finalName.endsWith(GLOBAL_SUFFIX) && !isNamedBeanAnAdvisorOrAdvice(finalName)) { // The target isn't an interceptor. this.targetName = finalName; if (logger.isDebugEnabled()) { logger.debug("Bean with name '" + finalName + "' concluding interceptor chain " + "is not an advisor class: treating it as a target or TargetSource"); } String[] newNames = new String[this.interceptorNames.length - 1]; System.arraycopy(this.interceptorNames, 0, newNames, 0, newNames.length); this.interceptorNames = newNames; } } } }
if (!isNamedBeanAnAdvisorOrAdvice(this.interceptorNames[i])) {