private Class < ? > beanType ( String name ) { Class < ? > type = context . getType ( name ) ; if ( ClassUtils . isCglibProxyClass ( type ) ) { return AopProxyUtils . ultimateTargetClass ( context . getBean ( name ) ) ; } return type ; }
Return the bean type untangling the proxy if needed