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