Class DetachableBeanHolder
- java.lang.Object
-
- org.hotswap.agent.plugin.spring.getbean.DetachableBeanHolder
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
HotswapSpringInvocationHandler
public class DetachableBeanHolder extends java.lang.Object implements java.io.SerializableLoadable detachable Spring bean holder- Author:
- Erki Ehtla
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DetachableBeanHolder(java.lang.Object bean, java.lang.Object beanFactry, java.lang.Class<?>[] paramClasses, java.lang.Object[] paramValues)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()Clear the bean for this proxystatic voiddetachBeans()Clears the bean references inside all of the proxiesjava.lang.ObjectgetBean()Returns an existing bean instance or retrieves and stores new bean from the Spring BeanFactoryjava.lang.ObjectgetTarget()Returns current target bean.protected booleanisBeanLoaded()voidsetTarget(java.lang.Object bean)Sets current target bean.
-
-
-
Constructor Detail
-
DetachableBeanHolder
public DetachableBeanHolder(java.lang.Object bean, java.lang.Object beanFactry, java.lang.Class<?>[] paramClasses, java.lang.Object[] paramValues)- Parameters:
bean- Spring Bean this object holdsbeanFactry- Spring factory that produced the bean with a ProxyReplacer.FACTORY_METHOD_NAME methodparamClasses-paramValues-
-
-
Method Detail
-
detachBeans
public static void detachBeans()
Clears the bean references inside all of the proxies
-
detach
public void detach()
Clear the bean for this proxy
-
setTarget
public void setTarget(java.lang.Object bean)
Sets current target bean.
-
getTarget
public java.lang.Object getTarget()
Returns current target bean.- Returns:
- current target bean.
-
getBean
public java.lang.Object getBean() throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetExceptionReturns an existing bean instance or retrieves and stores new bean from the Spring BeanFactory- Returns:
- Bean this instance holds
- Throws:
java.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-
isBeanLoaded
protected boolean isBeanLoaded()
-
-