org.springframework.beans.factory.support
Class AbstractBeanDefinition

Direct Known Subclasses:
ChildBeanDefinition, RootBeanDefinition

public abstract class AbstractBeanDefinition

Common base class for bean definitions. Use a FactoryBean to customize behaviour when returning application beans.

A BeanDefinition describes a bean instance, which has property values and further information supplied by concrete classes or subinterfaces.

Once configuration is complete, a BeanFactory will be able to return direct references to objects defined by BeanDefinitions.

Author:
Rod Johnson, Juergen Hoeller
Version: $Id: AbstractBeanDefinition.java,v 1.10 2004/02/04 17:23:45 jhoeller Exp $

Method Summary
 MutablePropertyValuesgetPropertyValues()
          Return the PropertyValues to be applied to a new instance of this bean.
 StringgetResourceDescription()
           
 booleanisLazyInit()
          Return whether this bean should be lazily initialized.
 booleanisSingleton()
          Return whether this a Singleton, with a single, shared instance returned on all calls,
 voidsetLazyInit(boolean lazyInit)
          Set whether this bean should be lazily initialized.
 voidsetResourceDescription(String resourceDescription)
           
 voidsetSingleton(boolean singleton)
          Set if this a Singleton, with a single, shared instance returned on all calls.
 voidvalidate()
          Validate this bean definition.

Method Detail

getPropertyValues

public MutablePropertyValues getPropertyValues()
Return the PropertyValues to be applied to a new instance of this bean.

getResourceDescription

public String getResourceDescription()

isLazyInit

public boolean isLazyInit()
Return whether this bean should be lazily initialized.

isSingleton

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

setLazyInit

public void setLazyInit(boolean lazyInit)
Set whether this bean should be lazily initialized. Only applicable to a singleton bean. If false, it will get instantiated on startup by bean factories that perform eager initialization of singletons.

setResourceDescription

public void setResourceDescription(String resourceDescription)

setSingleton

public void setSingleton(boolean singleton)
Set if this a Singleton, with a single, shared instance returned on all calls. If false, the BeanFactory will apply the Prototype design pattern, with each caller requesting an instance getting an independent instance. How this is defined will depend on the BeanFactory. "Singletons" are the commoner type.

validate

public void validate()
throws BeanDefinitionValidationException
Validate this bean definition.
Throws:
BeanDefinitionValidationException - in case of validation failure

Association Links

to Class org.springframework.beans.MutablePropertyValues

to Class java.lang.String