类 SetFactoryBean
- java.lang.Object
- org.springframework.beans.factory.config.AbstractFactoryBean<Set<Object>>
- org.springframework.beans.factory.config.SetFactoryBean
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<Set<Object>>
,InitializingBean
public class SetFactoryBean extends AbstractFactoryBean<Set<Object>>
Simple factory for shared Set instances. Allows for central setup of Sets via the "set" element in XML bean definitions.- 从以下版本开始:
- 09.12.2003
- 作者:
- Juergen Hoeller
- 另请参阅:
ListFactoryBean
,MapFactoryBean
字段概要
从类继承的字段 org.springframework.beans.factory.config.AbstractFactoryBean
logger
从接口继承的字段 org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
构造器概要
构造器 构造器 说明 SetFactoryBean()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
构造器详细资料
SetFactoryBean
public SetFactoryBean()
方法详细资料
setSourceSet
public void setSourceSet(Set<?> sourceSet)
Set the source Set, typically populated via XML "set" elements.
setTargetSetClass
public void setTargetSetClass(@Nullable Class<? extends Set> targetSetClass)
Set the class to use for the target Set. Can be populated with a fully qualified class name when defined in a Spring application context.Default is a linked HashSet, keeping the registration order.
- 另请参阅:
LinkedHashSet
getObjectType
public Class<Set> getObjectType()
从类复制的说明:AbstractFactoryBean
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.- 指定者:
getObjectType
在接口中FactoryBean<Set<Object>>
- 指定者:
getObjectType
在类中AbstractFactoryBean<Set<Object>>
- 返回:
- the type of object that this FactoryBean creates, or
null
if not known at the time of the call - 另请参阅:
FactoryBean.getObjectType()
createInstance
protected Set<Object> createInstance()
从类复制的说明:AbstractFactoryBean
Template method that subclasses must override to construct the object returned by this factory.Invoked on initialization of this FactoryBean in case of a singleton; else, on each
AbstractFactoryBean.getObject()
call.- 指定者:
createInstance
在类中AbstractFactoryBean<Set<Object>>
- 返回:
- the object returned by this factory
- 另请参阅:
AbstractFactoryBean.getObject()