protected Class<?> getRealClassInternal(Object o) {
if (AopUtils.isAopProxy(o) && (o instanceof Advised)) {
Advised advised = (Advised)o;
try {
TargetSource targetSource = advised.getTargetSource();
Object target = null;
try {
target = targetSource.getTarget();
} catch (BeanCreationException ex) {
// some scopes such as 'request' may not
// be active on the current thread yet
return getRealClassFromClassInternal(targetSource.getTargetClass());
}
if (target == null) {
Class<?> targetClass = AopUtils.getTargetClass(o);
if (targetClass != null) {