|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.config.java.DummyFactory
public class DummyFactory
Simple factory to allow testing of FactoryBean support in AbstractBeanFactory. Depending on whether its singleton property is set, it will return a singleton or a prototype instance.
Implements InitializingBean interface, so we can check that factories get this lifecycle callback if they want.
Field Summary | |
---|---|
static String |
SINGLETON_NAME
|
Constructor Summary | |
---|---|
DummyFactory()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
BeanFactory |
getBeanFactory()
|
String |
getBeanName()
|
Object |
getObject()
Return the managed object, supporting both singleton and prototype mode. |
Class<?> |
getObjectType()
|
TestBean |
getOtherTestBean()
|
boolean |
isPostProcessed()
|
boolean |
isSingleton()
Return if the bean managed by this factory is a singleton. |
static void |
reset()
Clear static state. |
void |
setBeanFactory(BeanFactory beanFactory)
|
void |
setBeanName(String beanName)
|
void |
setOtherTestBean(TestBean otherTestBean)
|
void |
setPostProcessed(boolean postProcessed)
|
void |
setSingleton(boolean singleton)
Set if the bean managed by this factory is a singleton. |
boolean |
wasInitialized()
Was this initialized by invocation of the afterPropertiesSet() method from the InitializingBean interface? |
static boolean |
wasPrototypeCreated()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SINGLETON_NAME
Constructor Detail |
---|
public DummyFactory()
Method Detail |
---|
public static void reset()
public boolean isSingleton()
isSingleton
in interface FactoryBean
org.springframework.config.java.context.java.beans.factory.FactoryBean#isSingleton()
public void setSingleton(boolean singleton)
public void setBeanName(String beanName)
setBeanName
in interface BeanNameAware
public String getBeanName()
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
public BeanFactory getBeanFactory()
public void setPostProcessed(boolean postProcessed)
public boolean isPostProcessed()
public void setOtherTestBean(TestBean otherTestBean)
public TestBean getOtherTestBean()
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public boolean wasInitialized()
public static boolean wasPrototypeCreated()
public Object getObject() throws BeansException
getObject
in interface FactoryBean
BeansException
org.springframework.config.java.context.java.beans.factory.FactoryBean#getObject()
public Class<?> getObjectType()
getObjectType
in interface FactoryBean
public void destroy()
destroy
in interface DisposableBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |