org.springframework.aop.framework.autoproxy.metadata
Class AttributesPrototypeTargetSourceCreator

java.lang.Object
  extended by org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
      extended by org.springframework.aop.framework.autoproxy.metadata.AttributesPrototypeTargetSourceCreator
All Implemented Interfaces:
TargetSourceCreator, BeanFactoryAware, DisposableBean

public class AttributesPrototypeTargetSourceCreator
extends AbstractBeanFactoryBasedTargetSourceCreator

PrototypeTargetSourceCreator driven by metadata. Creates a prototype only if there's a PrototypeAttribute associated with the class.

Author:
Rod Johnson
See Also:
PrototypeTargetSource

Field Summary
 
Fields inherited from class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
logger
 
Constructor Summary
AttributesPrototypeTargetSourceCreator()
          Create a new AttributesPrototypeTargetSourceCreator.
AttributesPrototypeTargetSourceCreator(Attributes attributes)
          Create a new AttributesPrototypeTargetSourceCreator.
 
Method Summary
 void afterPropertiesSet()
           
protected  AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class beanClass, String beanName)
          Subclasses must implement this method to return a new AbstractPrototypeBasedTargetSource if they wish to create a custom TargetSource for this bean, or null if they are not interested it in, in which case no special target source will be created.
 void setAttributes(Attributes attributes)
          Set the Attributes implementation to use.
 
Methods inherited from class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
destroy, getBeanFactory, getTargetSource, isPrototypeBased, setBeanFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributesPrototypeTargetSourceCreator

public AttributesPrototypeTargetSourceCreator()
Create a new AttributesPrototypeTargetSourceCreator.

See Also:
setAttributes(org.springframework.metadata.Attributes)

AttributesPrototypeTargetSourceCreator

public AttributesPrototypeTargetSourceCreator(Attributes attributes)
Create a new AttributesPrototypeTargetSourceCreator.

Parameters:
attributes - the Attributes implementation to use
Method Detail

setAttributes

public void setAttributes(Attributes attributes)
Set the Attributes implementation to use.


afterPropertiesSet

public void afterPropertiesSet()

createBeanFactoryBasedTargetSource

protected AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class beanClass,
                                                                                  String beanName)
Description copied from class: AbstractBeanFactoryBasedTargetSourceCreator
Subclasses must implement this method to return a new AbstractPrototypeBasedTargetSource if they wish to create a custom TargetSource for this bean, or null if they are not interested it in, in which case no special target source will be created. Subclasses should not call setTargetBeanName or setBeanFactory on the AbstractPrototypeBasedTargetSource: This class' implementation of getTargetSource() will do that.

Specified by:
createBeanFactoryBasedTargetSource in class AbstractBeanFactoryBasedTargetSourceCreator
Parameters:
beanClass - the class of the bean to create a TargetSource for
beanName - the name of the bean
Returns:
the AbstractPrototypeBasedTargetSource, or null if we don't match this


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