public class SetFactoryBean extends AbstractFactoryBean<java.util.Set>
ListFactoryBean
,
MapFactoryBean
Modifier and Type | Field and Description |
---|---|
private java.util.Set |
sourceSet |
private java.lang.Class |
targetSetClass |
logger
Constructor and Description |
---|
SetFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set |
createInstance()
Template method that subclasses must override to construct
the object returned by this factory.
|
java.lang.Class<java.util.Set> |
getObjectType()
This abstract method declaration mirrors the method in the FactoryBean
interface, for a consistent offering of abstract template methods.
|
void |
setSourceSet(java.util.Set sourceSet)
Set the source Set, typically populated via XML "set" elements.
|
void |
setTargetSetClass(java.lang.Class targetSetClass)
Set the class to use for the target Set.
|
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
private java.util.Set sourceSet
private java.lang.Class targetSetClass
public void setSourceSet(java.util.Set sourceSet)
public void setTargetSetClass(java.lang.Class targetSetClass)
Default is a linked HashSet, keeping the registration order.
LinkedHashSet
public java.lang.Class<java.util.Set> getObjectType()
AbstractFactoryBean
getObjectType
in interface FactoryBean<java.util.Set>
getObjectType
in class AbstractFactoryBean<java.util.Set>
null
if not known at the time of the callFactoryBean.getObjectType()
protected java.util.Set createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean<java.util.Set>
AbstractFactoryBean.getObject()