org.springframework.config.java.support
Class ConfigurationSupport

java.lang.Object
  extended by org.springframework.config.java.support.ConfigurationSupport
All Implemented Interfaces:
BeanFactoryAware, ApplicationContextAware

public class ConfigurationSupport
extends Object
implements BeanFactoryAware, ApplicationContextAware

Convenient base class for Configurations, allowing easy lookup of beans in the owning factory

Author:
Rod Johnson

Constructor Summary
ConfigurationSupport()
           
 
Method Summary
protected  ApplicationContext getApplicationContext()
          Deprecated. 
<T> T
getBean(Class<T> type)
           
<T> T
getBean(Class<T> type, String beanName)
           
 Object getBean(String beanName)
           
protected  BeanFactory getBeanFactory()
           
protected  Object getConfigured(Object o)
          Invoke callbacks on the object, as though it was configured in the factory
protected  Object getObject(FactoryBean fb)
          Return the object created by this FactoryBean instance, first invoking any container callbacks on the instance
 void setApplicationContext(ApplicationContext ac)
           
 void setBeanFactory(BeanFactory beanFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationSupport

public ConfigurationSupport()
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Specified by:
setBeanFactory in interface BeanFactoryAware

getBeanFactory

protected BeanFactory getBeanFactory()

setApplicationContext

public void setApplicationContext(ApplicationContext ac)
Specified by:
setApplicationContext in interface ApplicationContextAware

getApplicationContext

@Deprecated
protected ApplicationContext getApplicationContext()
Deprecated. 


getBean

public Object getBean(String beanName)

getBean

public <T> T getBean(Class<T> type)

getBean

public <T> T getBean(Class<T> type,
                     String beanName)

getObject

protected Object getObject(FactoryBean fb)
Return the object created by this FactoryBean instance, first invoking any container callbacks on the instance

Parameters:
fb - FactoryBean instance
Returns:
the object created by the configured FactoryBean instance

getConfigured

protected Object getConfigured(Object o)
Invoke callbacks on the object, as though it was configured in the factory

Parameters:
o - object to configure
Returns:
object after callbacks have been called on it


Copyright � 2005-2008 Spring Framework. All Rights Reserved.