org.springframework.aop.scope

## 类 ScopedProxyFactoryBean

- java.lang.Object
- - org.springframework.aop.framework.ProxyConfig
  - - org.springframework.aop.scope.ScopedProxyFactoryBean

- 所有已实现的接口:
    Serializable, AopInfrastructureBean, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean<Object>

      public class ScopedProxyFactoryBean
      extends ProxyConfig
      implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.BeanFactoryAware, AopInfrastructureBean

  Convenient proxy factory bean for scoped objects.

  Proxies created using this factory bean are thread-safe singletons and may be injected into shared objects, with transparent scoping behavior.

  Proxies returned by this class implement the `ScopedObject` interface. This presently allows for removing the corresponding object from the scope, seamlessly creating a new instance in the scope on next access.

  Please note that the proxies created by this factory are class-based proxies by default. This can be customized through switching the "proxyTargetClass" property to "false".

  从以下版本开始:
    2.0
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `ProxyConfig.setProxyTargetClass(boolean)`, 序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `ScopedProxyFactoryBean()` Create a new ScopedProxyFactoryBean instance.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `getObject()`
    `Class<?>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)`
    `void` | `setTargetBeanName(String targetBeanName)` Set the name of the bean that is to be scoped.

    - ### 从类继承的方法 org.springframework.aop.framework.ProxyConfig

      `copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### ScopedProxyFactoryBean

          public ScopedProxyFactoryBean()

      Create a new ScopedProxyFactoryBean instance.

  - ### 方法详细资料

    - #### setTargetBeanName

          public void setTargetBeanName(String targetBeanName)

      Set the name of the bean that is to be scoped.

    - #### setBeanFactory

          public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

      指定者:
        `setBeanFactory` 在接口中 `org.springframework.beans.factory.BeanFactoryAware`

    - #### getObject

          public Object getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### getObjectType

          public Class<?> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`