public abstract class BeanSupport extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.BeanNameAware
resolveBeanInterface()
方法,以取得接口。toString()
方法。Constructor and Description |
---|
BeanSupport() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
assertInitialized()
检查服务已经被初始化,若否,则抛出
IllegalStateException 异常。 |
void |
destroy() |
protected void |
dispose()
销毁bean。
|
protected String |
getBeanDescription()
取得bean的描述:
beanName + ":" + beanInterfaceName 。 |
protected String |
getBeanDescription(boolean simpleName)
取得bean的描述:
beanName + ":" + beanInterfaceName 。 |
Class<?> |
getBeanInterface()
取得bean接口。
|
String |
getBeanName()
取得spring容器中的bean名称,仅用于调试。
|
protected void |
init()
初始化bean。
|
boolean |
isInitialized()
是否已经初始化。
|
protected void |
postDispose()
销毁后执行。
|
protected void |
postInit()
初始化后执行。
|
protected void |
preDispose()
销毁前执行。
|
protected void |
preInit()
初始化前执行。
|
protected Class<?> |
resolveBeanInterface() |
void |
setBeanName(String beanName)
设置spring容器中的bean名称,仅用于调试。
|
String |
toString()
转换成字符串。
|
public final Class<?> getBeanInterface()
protected Class<?> resolveBeanInterface()
public boolean isInitialized()
public void assertInitialized()
IllegalStateException
异常。public final void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected void dispose()
protected void preDispose()
protected void postDispose()
public final void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public String getBeanName()
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
protected String getBeanDescription()
beanName + ":" + beanInterfaceName
。protected String getBeanDescription(boolean simpleName)
beanName + ":" + beanInterfaceName
。Copyright © 2006–2018 TinyGroup. All rights reserved.