org.springframework.beans.factory.config
Interface BeanDefinition

All Known Implementing Classes:
AbstractBeanDefinition, ChildBeanDefinition, RootBeanDefinition

public interface BeanDefinition

A BeanDefinition describes a bean instance, which has property values, constructor argument values, and further information supplied by concrete implementations.

This is just a minimal interface: The main intention is to allow BeanFactoryPostProcessors (like PropertyPlaceholderConfigurer) to access and modify property values.

Since:
19.03.2004
Author:
Juergen Hoeller
See Also:
ConfigurableListableBeanFactory.getBeanDefinition(java.lang.String), BeanFactoryPostProcessor, PropertyPlaceholderConfigurer, RootBeanDefinition, ChildBeanDefinition

Method Summary
 ConstructorArgumentValues getConstructorArgumentValues()
          Return the constructor argument values for this bean, if any.
 MutablePropertyValues getPropertyValues()
          Return the PropertyValues to be applied to a new instance of the bean, if any.
 String getResourceDescription()
          Return a description of the resource that this bean definition came from (for the purpose of showing context in case of errors).
 boolean isAbstract()
          Return whether this bean is "abstract", i.e. not meant to be instantiated.
 boolean isLazyInit()
          Return whether this bean should be lazily initialized, i.e. not eagerly instantiated on startup.
 boolean isSingleton()
          Return whether this a Singleton, with a single, shared instance returned on all calls.
 

Method Detail

isAbstract

boolean isAbstract()
Return whether this bean is "abstract", i.e. not meant to be instantiated.


isSingleton

boolean isSingleton()
Return whether this a Singleton, with a single, shared instance returned on all calls.


isLazyInit

boolean isLazyInit()
Return whether this bean should be lazily initialized, i.e. not eagerly instantiated on startup. Only applicable to a singleton bean.


getPropertyValues

MutablePropertyValues getPropertyValues()
Return the PropertyValues to be applied to a new instance of the bean, if any. Can be modified during bean factory post-processing.

Returns:
the PropertyValues object, or null

getConstructorArgumentValues

ConstructorArgumentValues getConstructorArgumentValues()
Return the constructor argument values for this bean, if any. Can be modified during bean factory post-processing.

Returns:
the ConstructorArgumentValues object, or null

getResourceDescription

String getResourceDescription()
Return a description of the resource that this bean definition came from (for the purpose of showing context in case of errors).



Copyright (c) 2002-2007 The Spring Framework Project.