org.springframework.config.java.core
Class MethodBeanWrapper
java.lang.Object
org.springframework.config.java.core.MethodBeanWrapper
public class MethodBeanWrapper
- extends Object
Wrapper for the result returned by the method backing a bean instance. Uses
the getBean() calls tracker and if needed, proxies the returned value if
there are advisors that might apply to it.
- Author:
- Rod Johnson, Costin Leau, Chris Beams
Method Summary |
Object |
wrapResult(String beanName,
EnhancerMethodInvoker invoker)
Wrap the result of a bean definition method in a Spring AOP proxy if
there are advisors in the current factory that would apply to it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodBeanWrapper
public MethodBeanWrapper(BeanFactory owningBeanFactory,
BeanNameTrackingDefaultListableBeanFactory childTrackingFactory,
Collection<BeanMethodReturnValueProcessor> returnValueProcessors)
- Constructor.
- Parameters:
owningBeanFactory
- configurationListenerRegistry
- childTrackingFactory
-
wrapResult
public Object wrapResult(String beanName,
EnhancerMethodInvoker invoker)
throws Throwable
- Wrap the result of a bean definition method in a Spring AOP proxy if
there are advisors in the current factory that would apply to it. Note
that the advisors may have been added explicitly by the user or may have
resulted from Advisor generation on this class processing a Pointcut
annotation.
- Parameters:
beanName
- the bean to which the method result will be bindedinvoker
- hook for calling the java code
- Returns:
- the wrapped object
- Throws:
Throwable
- if the method invocation fails
Copyright ? 2005-2008 Spring Framework. All Rights Reserved.