org.springframework.beans.factory.config
Interface BeanDefinition

All Known Implementing Classes:
AbstractBeanDefinition

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
 Class getBeanClass()
          Deprecated. Use BeanFactory's getType method instead, which properly resolves child bean definitions and asks FactoryBeans for the type of object they create.
 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

getBeanClass

public Class getBeanClass()
Deprecated. Use BeanFactory's getType method instead, which properly resolves child bean definitions and asks FactoryBeans for the type of object they create.

Return the class defined for the bean, if any. Only returns the class for the particular bean definition - does not merge child definitions with parents!

See Also:
BeanFactory.getType(java.lang.String)

isAbstract

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


isSingleton

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


isLazyInit

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


getPropertyValues

public 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

public 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

public 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) 2003-2004 The Spring Framework Project.