org.springframework.config.java.context
Class AnnotationApplicationContext

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by org.springframework.context.support.AbstractApplicationContext
          extended by org.springframework.context.support.AbstractRefreshableApplicationContext
              extended by org.springframework.config.java.context.AnnotationApplicationContext
All Implemented Interfaces:
BeanFactory, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, ResourceLoader, ResourcePatternResolver

Deprecated. - Favor use of JavaConfigApplicationContext. This class will be eliminated before the 1.0 release of JavaConfig

@Deprecated
public class AnnotationApplicationContext
extends AbstractRefreshableApplicationContext

Annotation-aware application context that looks for classes annotated with the Configuration annotation and registers the beans they define.

Author:
Costin Leau, Rod Johnson, Chris Beams

Field Summary
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
 
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext
LOAD_TIME_WEAVER_BEAN_NAME
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
AnnotationApplicationContext()
          Deprecated. Create a new AnnotationApplicationContext w/o any settings.
AnnotationApplicationContext(ApplicationContext parent)
          Deprecated. Create a new AnnotationApplicationContext with the given parent.
AnnotationApplicationContext(ApplicationContext parent, Class<?>... classes)
          Deprecated. Create a new AnnotationApplicationContext with the given parent and classes.
AnnotationApplicationContext(ApplicationContext parent, String... basePackages)
          Deprecated. Create a new AnnotationApplicationContext with the given parent and base packages.
AnnotationApplicationContext(Class<?>... classes)
          Deprecated. Create a new AnnotationApplicationContext from the given classes (AbstractApplicationContext.refresh() is being called).
AnnotationApplicationContext(String... basePackages)
          Deprecated. Create a new AnnotationApplicationContext from the given locations (AbstractApplicationContext.refresh() is being called).
 
Method Summary
protected  String[] getBasePackages()
          Deprecated.  
protected  Class<?>[] getConfigClasses()
          Deprecated.  
protected  void loadBeanDefinitions(DefaultListableBeanFactory beanFactory)
          Deprecated.  
protected  void registerDefaultPostProcessors()
          Deprecated. Register the default post processors used for parsing Spring classes.
 void setBasePackages(String... basePackages)
          Deprecated. Set the base packages for configurations from Strings.
 void setConfigClasses(Class<?>... classes)
          Deprecated. Indicate the Classes that hold annotations suitable for configuring the current application context.
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addListener, cancelRefresh, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, destroyBeans, doClose, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getDisplayName, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, initApplicationEventMulticaster, initLifecycleDependentBeans, initMessageSource, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, setDisplayName, setParent, start, stop, toString
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, getResource, getResourceByPath, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.core.io.ResourceLoader
getClassLoader, getResource
 

Constructor Detail

AnnotationApplicationContext

public AnnotationApplicationContext()
Deprecated. 
Create a new AnnotationApplicationContext w/o any settings.

See Also:
DefaultResourceLoader.setClassLoader(ClassLoader), setConfigClasses(Class[]), setBasePackages(String[])

AnnotationApplicationContext

public AnnotationApplicationContext(ApplicationContext parent)
Deprecated. 
Create a new AnnotationApplicationContext with the given parent. The instance can be further configured before calling AbstractApplicationContext.refresh().

Parameters:
parent - the parent application context
See Also:
DefaultResourceLoader.setClassLoader(ClassLoader), setConfigClasses(Class[]), setBasePackages(String[])

AnnotationApplicationContext

public AnnotationApplicationContext(String... basePackages)
Deprecated. 
Create a new AnnotationApplicationContext from the given locations (AbstractApplicationContext.refresh() is being called).

Parameters:
basePackages - the base packages to scan

AnnotationApplicationContext

public AnnotationApplicationContext(Class<?>... classes)
Deprecated. 
Create a new AnnotationApplicationContext from the given classes (AbstractApplicationContext.refresh() is being called).

Parameters:
classes -

AnnotationApplicationContext

public AnnotationApplicationContext(ApplicationContext parent,
                                    Class<?>... classes)
Deprecated. 
Create a new AnnotationApplicationContext with the given parent and classes.

Parameters:
parent - the parent application context
classes - zero or more configuration classes
See Also:
AnnotationApplicationContext(ApplicationContext), AnnotationApplicationContext(Class...)

AnnotationApplicationContext

public AnnotationApplicationContext(ApplicationContext parent,
                                    String... basePackages)
Deprecated. 
Create a new AnnotationApplicationContext with the given parent and base packages.

Parameters:
parent - the parent application context
basePackages - the base packages to scan
See Also:
AnnotationApplicationContext(ApplicationContext), AnnotationApplicationContext(String...)
Method Detail

getBasePackages

protected String[] getBasePackages()
Deprecated. 

getConfigClasses

protected Class<?>[] getConfigClasses()
Deprecated. 

setBasePackages

public void setBasePackages(String... basePackages)
Deprecated. 
Set the base packages for configurations from Strings. These use the same conventions as the component scanning introduced in Spring 2.5.

Parameters:
basePackages -

setConfigClasses

public void setConfigClasses(Class<?>... classes)
Deprecated. 
Indicate the Classes that hold annotations suitable for configuring the current application context.

Parameters:
classes -

registerDefaultPostProcessors

protected void registerDefaultPostProcessors()
Deprecated. 
Register the default post processors used for parsing Spring classes.


loadBeanDefinitions

protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory)
                            throws IOException,
                                   BeansException
Deprecated. 
Specified by:
loadBeanDefinitions in class AbstractRefreshableApplicationContext
Throws:
IOException
BeansException


Copyright 2005-2008 Spring Framework. All Rights Reserved.