|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.config.AbstractFactoryBean org.springframework.beans.factory.config.SetFactoryBean
public class SetFactoryBean
Simple factory for shared Set instances. Allows for central setup of Sets via the "set" element in XML bean definitions.
ListFactoryBean
,
MapFactoryBean
Field Summary |
---|
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
---|
logger |
Constructor Summary | |
---|---|
SetFactoryBean()
|
Method Summary | |
---|---|
protected Object |
createInstance()
Template method that subclasses must override to construct the object returned by this factory. |
Class |
getObjectType()
This abstract method declaration shadows the method in the FactoryBean interface. |
void |
setSourceSet(Set sourceSet)
Set the source Set, typically populated via XML "set" elements. |
void |
setTargetSetClass(Class targetSetClass)
Set the class to use for the target Set. |
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
---|
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanFactory, setSingleton |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetFactoryBean()
Method Detail |
---|
public void setSourceSet(Set sourceSet)
public void setTargetSetClass(Class targetSetClass)
Default is a linked HashSet, keeping the registration order. If no linked Set implementation is available, a plain HashSet will be used as fallback (not keeping the registration order).
public Class getObjectType()
AbstractFactoryBean
getEarlySingletonInterfaces
implementation
in this class work on Sun's JDK 1.3 classic VM, which can't find the method
when executing getEarlySingletonInterfaces
else.
getObjectType
in interface FactoryBean
getObjectType
in class AbstractFactoryBean
null
if not known at the time of the callFactoryBean.getObjectType()
,
AbstractFactoryBean.getEarlySingletonInterfaces()
protected Object createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean
AbstractFactoryBean.getObject()
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |