org.springframework.beans.factory.config |
SPI interfaces and configuration-related convenience classes for bean factories.
|
Java Source File Name | Type | Comment |
AbstractFactoryBean.java | Class | Simple template superclass for
FactoryBean implementations that
creates a singleton or a prototype object, depending on a flag.
If the "singleton" flag is true (the default),
this class will create the object that it creates exactly once
on initialization and subsequently return said singleton instance
on all calls to the
AbstractFactoryBean.getObject() method.
Else, this class will create a new instance every time the
AbstractFactoryBean.getObject() method is invoked. |
AutowireCapableBeanFactory.java | Interface | Extension of the
org.springframework.beans.factory.BeanFactory interface to be implemented by bean factories that are capable of
autowiring, provided that they want to expose this functionality for
existing bean instances.
This subinterface of BeanFactory is not meant to be used in normal
application code: stick to
org.springframework.beans.factory.BeanFactory or
org.springframework.beans.factory.ListableBeanFactory for
typical use cases.
Integration code for other frameworks can leverage this interface to
wire and populate existing bean instances that Spring does not control
the lifecycle of. |
BeanDefinition.java | Interface | A BeanDefinition describes a bean instance, which has property values,
constructor argument values, and further information supplied by
concrete implementations. |
BeanDefinitionHolder.java | Class | Holder for a BeanDefinition with name and aliases.
Can be registered as a placeholder for an inner bean.
Can also be used for programmatic registration of inner bean
definitions. |
BeanDefinitionVisitor.java | Class | Visitor base class for traversing
BeanDefinition objects, in particular
the property values and constructor argument values contained in them. |
BeanFactoryPostProcessor.java | Interface | Allows for custom modification of an application context's bean definitions,
adapting the bean property values of the context's underlying bean factory. |
BeanPostProcessor.java | Interface | Allows for custom modification of new bean instances, e.g. |
BeanReference.java | Interface | Interface that exposes a reference to a bean name in an abstract fashion. |
BeanReferenceFactoryBean.java | Class | FactoryBean that exposes an arbitrary target bean under a different name. |
CommonsLogFactoryBean.java | Class | Factory bean for
commons-logging
org.apache.commons.logging.Log instances.
Useful for sharing Log instances among multiple beans instead of using
one Log instance per class name, e.g. |
ConfigurableBeanFactory.java | Interface | Configuration interface to be implemented by most bean factories. |
ConfigurableListableBeanFactory.java | Interface | Configuration interface to be implemented by most listable bean factories.
In addition to
ConfigurableBeanFactory , it provides facilities to
analyze and modify bean definitions, and to pre-instantiate singletons.
This subinterface of
org.springframework.beans.factory.BeanFactory is not meant to be used in normal application code: Stick to
org.springframework.beans.factory.BeanFactory or
org.springframework.beans.factory.ListableBeanFactory for typical
use cases. |
ConstructorArgumentValues.java | Class | Holder for constructor argument values, typically as part of a bean definition. |
CustomEditorConfigurer.java | Class | BeanFactoryPostProcessor implementation that allows for convenient
registration of custom
PropertyEditor property editors .
As of Spring 2.0, the recommended usage is to use custom
PropertyEditorRegistrar implementations that in turn register
any desired editors on a given
org.springframework.beans.PropertyEditorRegistry registry .
Each PropertyEditorRegistrar can register any number of custom editors.
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="propertyEditorRegistrars">
<list>
<bean class="mypackage.MyCustomDateEditorRegistrar"/>
<bean class="mypackage.MyObjectEditorRegistrar"/>
</list>
</property>
</bean>
Alternative configuration example with custom editor instances,
assuming inner beans for PropertyEditor instances:
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.util.Date">
<bean class="mypackage.MyCustomDateEditor"/>
</entry>
<entry key="mypackage.MyObject">
<bean id="myEditor" class="mypackage.MyObjectEditor">
<property name="myParam"><value>myValue</value></property>
</bean>
</entry>
</map>
</property>
</bean>
Also supports "java.lang.String[]"-style array class names and primitive
class names (e.g. |
CustomScopeConfigurer.java | Class | Simple
BeanFactoryPostProcessor implementation that effects the
registration of custom
Scope Scope(s) in a
ConfigurableBeanFactory . |
DestructionAwareBeanPostProcessor.java | Interface | Subinterface of BeanPostProcessor that adds a before-destruction callback. |
FieldRetrievingFactoryBean.java | Class | FactoryBean which retrieves a static or non-static field value.
Typically used for retrieving public static final constants. |
InstantiationAwareBeanPostProcessor.java | Interface | Subinterface of
BeanPostProcessor that adds a before-instantiation callback,
and a callback after instantiation but before explicit properties are set or
autowiring occurs.
Typically used to suppress default instantiation for specific target beans,
for example to create proxies with special TargetSources (pooling targets,
lazily initializing targets, etc), or to implement additional injection strategies
such as field injection.
NOTE: This interface is a special purpose interface, mainly for
internal use within the framework. |
InstantiationAwareBeanPostProcessorAdapter.java | Class | Adapter that implements all methods on
SmartInstantiationAwareBeanPostProcessor as no-ops, which will not change normal processing of each bean instantiated
by the container. |
ListFactoryBean.java | Class | Simple factory for shared List instances. |
MapFactoryBean.java | Class | Simple factory for shared Map instances. |
MethodInvokingFactoryBean.java | Class | FactoryBean which returns a value which is the result of a static or instance
method invocation. |
ObjectFactoryCreatingFactoryBean.java | Class | A
org.springframework.beans.factory.FactoryBean implementation that
returns a value which is an
org.springframework.beans.factory.ObjectFactory that in turn returns a bean sourced from a
org.springframework.beans.factory.BeanFactory .
As such, this may be used to avoid having a client object directly calling
org.springframework.beans.factory.BeanFactory.getBean(String) to get
a (typically prototype) bean from a
org.springframework.beans.factory.BeanFactory , which would be a
violation of the inversion of control principle. |
PreferencesPlaceholderConfigurer.java | Class | Subclass of PropertyPlaceholderConfigurer that supports JDK 1.4's
Preferences API (java.util.prefs ).
Tries to resolve placeholders as keys first in the user preferences,
then in the system preferences, then in this configurer's properties.
Thus, behaves like PropertyPlaceholderConfigurer if no corresponding
preferences defined.
Supports custom paths for the system and user preferences trees. |
PropertiesFactoryBean.java | Class | Allows for making a properties file from a classpath location available
as Properties instance in a bean factory. |
PropertyOverrideConfigurer.java | Class | A property resource configurer that overrides bean property values in an application
context definition. |
PropertyPathFactoryBean.java | Class | FactoryBean that evaluates a property path on a given target object. |
PropertyPlaceholderConfigurer.java | Class | A property resource configurer that resolves placeholders in bean property values of
context definitions. |
PropertyResourceConfigurer.java | Class | Allows for configuration of individual bean property values from a property resource,
i.e. |
ResourceFactoryBean.java | Class | FactoryBean for
Resource descriptors,
exposing a Resource object for a specific resource location. |
RuntimeBeanNameReference.java | Class | Immutable placeholder class used for a property value object when it's a
reference to another bean name in the factory, to be resolved at runtime. |
RuntimeBeanReference.java | Class | Immutable placeholder class used for a property value object when it's
a reference to another bean in the factory, to be resolved at runtime. |
Scope.java | Interface | Strategy interface used by a
ConfigurableBeanFactory ,
representing a target scope to hold bean instances in.
This allows for extending the BeanFactory's standard scopes
ConfigurableBeanFactory.SCOPE_SINGLETON "singleton" and
ConfigurableBeanFactory.SCOPE_PROTOTYPE "prototype" with custom further scopes, registered for a
ConfigurableBeanFactory.registerScope(StringScope) specific key .
org.springframework.context.ApplicationContext implementations
such as a
org.springframework.web.context.WebApplicationContext may register additional standard scopes specific to their environment,
e.g. |
ServiceLocatorFactoryBean.java | Class | A
org.springframework.beans.factory.FactoryBean implementation that
takes an interface which must have one or more methods with
the signatures MyType xxx() or MyType xxx(MyIdType id)
(typically, MyService getService() or MyService getService(String id) )
and creates a dynamic proxy which implements that interface, delegating to an
underlying
org.springframework.beans.factory.BeanFactory .
Such service locators permit the decoupling of calling code from
the
org.springframework.beans.factory.BeanFactory API, by using an
appropriate custom locator interface. |
SetFactoryBean.java | Class | Simple factory for shared Set instances. |
SingletonBeanRegistry.java | Interface | Interface that defines a registry for shared bean instances. |
SmartInstantiationAwareBeanPostProcessor.java | Interface | Extension of the
InstantiationAwareBeanPostProcessor interface,
adding a callback for predicting the eventual type of a processed bean.
NOTE: This interface is a special purpose interface, mainly for
internal use within the framework. |
TypedStringValue.java | Class | Holder for a typed String value. |